All of this is networked via RS-232
"Wire," the library responsible for I2C communication
QuoteAll of this is networked via RS-232 Quote"Wire," the library responsible for I2C communication How do these two work together?_____Rob
This is just to report my progress with getting a master Arduino to send query information to a slave Arduino, which then synchronously returns the specified data.
... this means that the onReceive handler has to take the data passed to it, process it however it needs to be processed, and put the results into global variables that can then be queried in the onRequest handler ...
Can you explain exactly what you mean by "synchronously" in this context? Do you mean, you ask a question and get an answer?
What is the problem with global variables? The response is done in an interrupt handle
I have done some examples of sending/receiving data via I2C here (scroll down to "Request/response"):http://www.gammon.com.au/forum/?id=10896
You shouldn't need to send things three times. Why do that?
I've been able to find no examples online of anyone sending requests from a master for the return of specific data from a slave.
i did it because i'd often get zero instead of the byte i'd requested. i have no idea why -- it was being flaky. i need to investigate further. the other i2c devices on the bus all seem to work fine; it's just the slave that occasionally throws out glitch zeroes in response to queries.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16