How can I use two I2C modules?

Hi,

I want to measure CO2 in different locations using two similar CO2 sensor (MiCS-VZ-89TE). I can communicate with the sensor over I2C0.

But because two sensors have exactly the same I2C address, I cannot connect the second sensor to the same I2C0 module.

How can I activate I2C1 and where are the SDA and SCL pins of I2C1?

Parents Reply
  • When I activate logs, I receive the following error in NRF Terminal:

    [00:00:01.506,469] <err> i2c_nrfx_twi: Error on I2C line occurred for message 0

    I don't know what it means.

    In the nRF52840_DK_User_Guide_20201203 Document, P0.30 and P0.31 are mapped to AIN6 and AIN7. 
    But I found something in devicetree file nrf52840dk_nrf52840.dts. P0.30 and P0.31 are mapped to AIN6 and AIN7.

    I deactivated them but it still doesn't work.

    	arduino_adc: analog-connector {
    		compatible = "arduino,uno-adc";
    		#io-channel-cells = <1>;
    		io-channel-map = <0 &adc 1>;	/* A0 = P0.3 = AIN1 */
    		/* 		 <1 &adc 2>,	/* A1 = P0.4 = AIN2 */
    		/*		 <2 &adc 4>,	/* A2 = P0.28 = AIN4 */
    		/*		 <3 &adc 5>,	/* A3 = P0.29 = AIN5 */
    		/*       <4 &adc 6>,	/* A4 = P0.30 = AIN6 */
    		/*       <5 &adc 7>;	/* A5 = P0.31 = AIN7 */
    	};
    

Children
Related