I2C wire library

Post date: Mar 12, 2018 5:46:01 PM

Rules

    • The slave can NEVER initiate anything. It sits there and waits for a transmission or a request.
    • The only way the slave can write is to get a request first.
    • Master requestFrom() -> Slave onRequest() write
    • Master endTransmission() -> Slave on Receive() read
    • Maximum of 32 bytes
    • read the documentation of the devices for the protocol (meaning of the bytes). There is no standard.
    • read the documenation for accepted speeds. Maximum speed depends on capacity (pF PicoFarad) of wire.

No hardware data verification.

If you want to be sure, the receiver needs to send the data back to the sender, or you need to send a checksum byte along with the message.

https://learn.sparkfun.com/tutorials/i2c/