I have a Arduino Uno connected to a v2.0. motor shield which I use for 1 stepper motor. I think I've seen somewhere that the motor shield uses the two SDA and SCL ports to comunicate with the Arduino Uno. Now I've connected a 16x02 lcd display with I2C module to 5V / GND / A4 / A5. But I need to more ports with a I2C bus for a sensor. can I just take A2 and A3 for the sensor?
If yes then I don't know how to connect it in the code.
LiquidCrystal_I2C lcd(0x27, 16, 2);
I've tried to connect the lcd to A2 and A3 but it won't work because I think I need to change the 0x27 to another number. Does anyone know how to use one Arduino Uno for two parts with I2C bus needed?
Wire.beginTransmission(82); // transmit to device #82 (0x52)
// the address specified in the datasheet is 164 (0xa4)
// but i2c adressing uses the high 7 bits so it's 82
As per the datasheet the I2C address of the TOF10120 is 0xA4. But i2c addressing uses the high 7 bits so it’s 0x52 which is equivalent to 82. You can also find the I2C address of the TOF10120 by using the I2C Scanner code which is available below in the programming section.