-
Notifications
You must be signed in to change notification settings - Fork 68
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
Make requests to I2C slaves #81
Comments
Hey @TurboNerd95. Were you able to make one master multiple slaves communication? That's what I need now, and I hope there is a way to use this lib for it. |
Yes, there is an additional argument in the sendData function (targetAddress), which allows the master to send to multiple slaves: uint8_t I2CTransfer::sendData(const uint16_t& messageLen, const uint8_t& packetID, const uint8_t& targetAddress){ However, the "request" function I was asking about doesn't seem to be implemented yet. |
@TurboNerd95 Hey, thanks. I was able to discover that on the day I asked but now struggling to implement Slave to Master communication. Were you able to implement this request function somehow, or you used another solution? That's the same thing I also need now :) |
I just ended up using the basic wire.h, in order to request data from the slave's. Here is a comprehensive set of examples: https://forum.arduino.cc/t/use-i2c-for-communication-between-arduinos/653958. |
Hello,
Very good job with the library. I had a lot of struggles interconnecting Arduino's when I started out and this eliminates the trouble.
I also think there should be a way for this library to incorporate the "Wire.requestFrom()" function from the Wire library, which allows a master Arduino to collect data from 1 or more I2C slave Arduino's, while also being able to transmit data to them. This would allow for 2 way communication, without the need to use multi-mastering (potentially unreliable).
The text was updated successfully, but these errors were encountered: