-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Received I2C data is mangled #8390
Comments
It's quite some years since I really coded in C, so yes I've been lazy. The first buffer size mismatch is a fair cop - 7 bytes ( The second double assignment of the
Padding bytes should be showing spaces ( The scope trace is from CircuitPython as the master, but it looks identical when the Arduino code is running as master on the TinyS3. |
It would be worth retesting with 9.2.x, as a lot of the underlying I2C implementation has changed. |
CircuitPython version
Code/REPL
Behavior
Posting as an issue as suggested at https://forums.adafruit.com/viewtopic.php?p=985515#p985515
The printed output should be
Sent 123, got bytearray(b'3\x00\x00\x00\x00\x00')
But instead is
bytearray(b'"\x00\x00\x00\x00\x00')
Description
No response
Additional information
I am sending some code over I2C to an ATTiny85 which is configured with a sketch to read it all in, then send back 6 bytes, the first of which is the final byte from the sent code. The idea was just to confirm that I could get I2C to work between the two chips, but CircuitPython seems to mangling the received the code.
The code running on the ATTiny is:
Running Arduino on the TinyS3 with a sketch to do similar to the CircuitPython behaves correctly. Here is that sketch:
Which gives the expected output:
Further, using a login analyzer on the I2C pins shows the correct data on the wire.
The text was updated successfully, but these errors were encountered: