I2C on Pytrack2 pyport
I connected a I2C sensor to the pyport on pytrack2. Than my script is:
"from machine import I2C, Pin
i2c = I2C(0, pins=(SDA,SCL))
Anyone can help me about how can I refer to SDA and SCL on pyport? I don't find in any place which Pins I have to indicate.
thank you for any help.
@jcaron thank you for your replay. my question is: have you ever tried to access a sensor connected to pyport on pytrack2 and you success on this? My fear is that thare is some issue on this port.
@lolloz I2C is a shared bus with one master and potentially many slaves. If you use other devices on that bus, you need to re-use the same I2C device.
@Gijs P21 and P22 seems for gps and accelerometer
@Gijs Hi thank you so much for your answer. I try to access I2C using P22 and P21 but I got "bus error". Do you have success using I2C on sensor port with these Pins?
The pin numbers are P22 for SDA, and P21 for SCL
They are indicated (maybe in an obscure way) here: https://docs.pycom.io/datasheets/expansionboards/pysense2/ in the pinout