Issue with Wire library - sending 0 causes an error #891
icarusbop
started this conversation in
Library discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I have a Raspberry Pi connected to a test circuit with an ATTINY 1624, using the I2c interface.
The Rpi is using the SMBUS2 python library, the 1624 is using the Wire Library
I can successfully send data from the ATTINY 1624 to the Rpi over I2c, with one small exception - if I try to send a value of zero(0), I get an error on the Rpi receiving side. I have tested with a loop and can send every value from 255 down to 1, it only fails at zero.
I can't be sure if the issue is on the Rpi side or the 1624 side, but I have tried testing different functions on the Rpi library side to achieve the same effect (receiving a string of bytes, but only keeping the first byte - this uses a different function and therefore presumably different code), and I get the same error. This makes me wonder if the issue might be on the wire library for the 1624?
Here is the minimum code for the 1624 to replicate my issue (I can post the Rpi test code if required)
The error I receive on the Rpi side is:
Beta Was this translation helpful? Give feedback.
All reactions