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
  • Ok, thank you for answer. I connected the sensor to I2C1 pins P0.30 and P0.31, I cannot communicate with sensor.

    When I connect the sensor to I2C0 over P0.26 and P0.27, I can communicate.

    Is there any other settings in devicetree overlay or CONFIG variables?

    In my devicetree overlay I have:

    &i2c1 {
        status = "okay";
        vz89te1: vz89te@70 {
            compatible = "i2c-device";
            label = "MiCS-VZ-89TE-1";
            reg = <0x70>;
        };
    };

    status = "okay", because, as default in devicetree file, status = "okay" is commented, so I wrote it in overlay file.

Children
Related