![]() ![]() And how many bytes you wish to receive.To request a block of data from a slave I2C device you also need to know two things: 4 = other Error, possibly lost bus arbitration Uint8_t err = Wire.endTransmission(true) // Actually preform I2C write Transaction, Terminate with STOP Wire.write(0x31) // add 0x31 to the Wire.h output buffer If you want to send 0x31 to I2C slave 0x50, the following is example Arduino code: #include The I2C address of the slave you wish to communicate with.Ī byte value from 1 to 127.To transmit data you need to know two things: I2C operations using the Wire.H library are composed of transactions, either to transmit data or receive data. Let's say for example that I send the valule 0x31 using Wire.write(0x31) to the slave, I should wait for an "AK" from the slave (SAK), how do I read this value, or which is the function that tells me that I got the "AK" right? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |