Sensor data transmission from node to hub using espnow

BaartCM
Posts: 17
Joined: Tue Mar 13, 2018 11:55 am

Sensor data transmission from node to hub using espnow

Postby BaartCM » Tue Mar 27, 2018 9:22 pm

Hi,

I’m working on a project where a number of nodes connect to a hub using espnow and the example code here https://github.com/pcbreflux/espressif/ ... asterSlave

Firstly, I have never worked with WiFi before so forgive me if this isn’t the best method for my project and point me gently in the right direction but I need good examples to work out how it’s done!

In my project, I will have a pc which is connected to the hub by usb. The pc will request data from one of the nodes connected to the hub. I won’t have access to a WiFi network so the esp’s will have to create their own. On receipt of a request, the node will collect 16384 samples from an accelerometer at something like 5000 samples per second. Then this will need to be send back by WiFi to the hub.

As the data packet has a limit of 250 bytes at a time, I considered sending them in blocks of 64 values = 128 bytes which divides equally into the sample length which has to be a power of two for the fft I need to perform on it.

I also considered 2 bytes in front of the data as a sequence number so bad packets can be repeated on request.

Let’s say I have an Int array called twf, can somebody please suggest how I format the values into individual strings to send. Should I have a check sum at the end as well or does the espnow include error checking? Ie when the esp_now_send return success, what does success actually mean?

Regards, Steve.

Who is online

Users browsing this forum: No registered users and 127 guests