Replies: 2 comments
-
|
Hi @camelator You can also see the example: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
it is an issue with regards to the Arduino documentation, because if the onReceiveHandler is not set, no data is received. see interrupt on the twowire class. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
it looks like not possible to directly use TwoWire in slave mode. in this case the rxbuffer is never fill.
There is a différence in having an empty user receive handler and not having a receive handler. In the first case rxbuffer is fill correctly in the second case it is not fill.
Having:
TwoWire myI2C(PB7, PB6);setup:
myI2C.begin(0x18) ;in this case
myI2C.available()is never > 0.to have
myI2C.available() > 0when a message is received you must have implemented:myI2C.onReceive(onReceiveHandler);onReceiveHandlermay be an empty code {}in this situation
TwoWireworks correctly.To Reproduce
TwoWire myI2C(PB7, PB6);setup:
myI2C.begin(0x18) ;loop:
to make the program works:
setup:
Beta Was this translation helpful? Give feedback.
All reactions