8/29/2023 0 Comments Arduino help wire library![]() ![]() When using Wire library, there is a first point to keep in mind: Next, I2C protocol is quite low-level and a bit complex but fortunately, the Wire library that comes with Arduino helps a lot and hides some of this complexity. FOR THE SLAVE DEVICE TO RESPOND WITH THE DATA?įirst off when talking about I2C bus, an important point to clarify: did you connect pullup resistors to both SDA and SCL lines ( A4 and A5 respectively)? Without those, the I2C bus will not work properly. ![]() HOW DO I LEAVE THE BUS OPEN LONG ENOUGH Slave address + 'write' indication bit My understanding from the datasheet is that I need to send this command to wake it up and request a measurement:Īnd then I need to send this command to get the data:ĠxD8 0x06 0xD9 #define HEARTBEAT_PIN (13) I'm looking at the data on the I2C bus with a logic analyzer, and I'm sending what I expect, but I seem to cut off the slave before he can respond. I'm trying to get data from a sensor, but don't see how I can get data back.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |