You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That method just sets whatever you gave as the addrss to TWDR and waits for ACK/NACK it doesn't do any automagical bit shifting. The write & read methods of course expect the 7-bit slave address and will use the SLA_W and SLA_R macros to construct the correct 8 bit address for reading/writing.
I discovered this issue when I used my logic analyzer to see why my device at 0x30 wasn't responding and found that I2c._sendAddress(0x30) actually sends 0x18 so it got no ACK from my device!
Apart from that, the big bonus of your library is that it overcomes the 32 byte buffer limit in the Wire lib so big thanks for that!
I've found that I2c._sendAddress(address) is actually sending the address shifted right one bit.
For example, if address is 0x30 then I2c._sendAddress(address) actually sends 0x18.
As a workaround I have to use I2c._sendAddress(address << 1);
The text was updated successfully, but these errors were encountered: