Replies: 2 comments 1 reply
-
I now have a suspicion... When ignoring the CRC, the values were somehow plausible. But the value from i2c, read over 16/17 or 20/21 only reacted on the sensor attached to 16/17. So my idea was that there are somehow BOTH Pins attached. |
Beta Was this translation helpful? Give feedback.
-
yes, it is. both pins are attached, because at no point, the I2C function of the "old"pins is removed. gpio_set_function(_sda, GPIO_FUNC_NULL); should be added in void TwoWire::end() |
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to connect to 4 unique I2C Sensors (with same I2C address) - so I thought i could all of them connect to some SCL and SDA Pins an then change the pins to read Sensor 1+2 from some pins, then Sensor 3+4 from some other Pins, but always with Wire and Wire1.
But this does not work. The first time reading from sensor 1+2 works. After that I call Wire.end, then reassign the pins with Wire.SetSDA und Wire.SetSCL
then Wire.begin, and the same code to read the values as before.
But somehow the values are scrambled, they change but CRC fails and the data is not plausible.
Any idea? Di I miss some reset or reinitialization ?
Or is this maybe a flaw in the wire lib ?
Beta Was this translation helpful? Give feedback.
All reactions