Hello all,
I want to transfer data between two ESP32 through I2C instead of ESP-NOW.
When the ESP32 is set as a slave device, it maintans a slave address and an internal ring buffer. The protocol used by ESP is: after receiving the slave address, the slave device will immediately send N bytes to the I2C bus from the very first byte in the ring buffer.
Is it possible to specify the start address to be read from? I feel it would be more natrual if the slave device can maintain a fixed-size buffer and refresh it perodically. The protocol should also be modified so that the master can specify the start address to be read in the buffer. By this way the ESP slave device would look like an I2C device with 128 registers if the buffer length is set to 128 for example.
Best Regards
Zhao
ESP I2C: Read a specific byte in ESP32 slave inner buffer?
-
- Posts: 21
- Joined: Tue Apr 13, 2021 8:43 am
-
- Posts: 75
- Joined: Fri Dec 04, 2020 9:56 pm
Re: ESP I2C: Read a specific byte in ESP32 slave inner buffer?
I would quote myself from this post, including the part about sense of getting such buffer access. But most likely I just did not understand your aim.
-
- Posts: 21
- Joined: Tue Apr 13, 2021 8:43 am
Re: ESP I2C: Read a specific byte in ESP32 slave inner buffer?
Yeah maybe few people have the same demand.
From the master side I want to read an arbitary byte, say the second byte in the slave ring buffer. Or from the 5th to the 10th byte in the salve ring buffer.
From the slave side I want to clear the ring buffer before writing new content into it, so that there is only one message in the ring buffer, instead of appending the new message after the old message that has not yet been read by master.
Best Regards
Zhao
From the master side I want to read an arbitary byte, say the second byte in the slave ring buffer. Or from the 5th to the 10th byte in the salve ring buffer.
From the slave side I want to clear the ring buffer before writing new content into it, so that there is only one message in the ring buffer, instead of appending the new message after the old message that has not yet been read by master.
Best Regards
Zhao
Who is online
Users browsing this forum: Baidu [Spider] and 249 guests