![]() Also have the read() functionality on the client automatically advance to the next address by default, that way the controlling mcu can continuously read through all memory with very little interaction once the start address has been established (again via a write to the client first that sets the start address). Short answer: What you want to do is to create your own format, or protocol, for the write() data that you send to the client, and use multiple bytes give yourself the ability to have a command and some kind address in the data. You're correct that the client only occupies one I2C address. ![]() I assumed the write would be something like Wire.write(register address, data, length) or something like this. I believe that blow is all the functions available in the Wire.h library, and none of them seem to address the memory address location. ![]() All I see is the slave address for picking the slave, so when I "write" data to somewhere, how does it know where to go or what register to write to? however I don't see anywhere that addresses the memory address. That being, that I understand Wire.begin(SLAVE_ADDR) chooses the slave, but then when I write data its just Wire.write(value/string) or Wire.write(data, length). However I am having a bit of misunderstanding when it comes to the Wire.h library. Now I want to write to a memory and then read that memory to confirm my write was successful. (Using a DUE as the master and micro as the slave.) I recently have been getting the hang of I2C communications using the Arduino, first using it to control an LED on another Arduino. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |