ESP32 with low-level RF?
Posted: Thu Nov 14, 2019 1:51 am
So I have a bunch of devices that all use the ESP32 which I need to synchronize because the clocks are never quite precise enough over a long time.
My usual solution to this is to have one "master" device send out "clock" pulses at a much slower rate to the other devices to increment the state so that they are all in the same place in their code at the same time. This works great on wires, but I'd like to do it wirelessly. They are strobe lights at changing strobe rates from 10-50Hz so that means accuracy should really be better than 10ms or else they rapidly (minutes) get too far out of phase and interfere with each other.
Problem is, most protocols have too much latency for this to work reliably -- the solution I can find online suggests using the NRF24L01 over SPI to the ESP32 for this function, but that seems like something the ESP32 surely must be able to do with an entire second core...
Is this impossible? I feel ridiculous having two separate transceivers on one board when the one I'm adding is even lower function! Can I use the ESP32 to receive and interpret wireless information faster than say 1-2ms from reception? I'm happy to use something way lower level than wifi or bluetooth, I'll just have one transmitter sending some byte with a code that each other light will receive and if the code matches the reference it'll increment the state. At least it won't drift... but even a few ms of delay between them will be visibly annoying due to the nature of the strobing.
My usual solution to this is to have one "master" device send out "clock" pulses at a much slower rate to the other devices to increment the state so that they are all in the same place in their code at the same time. This works great on wires, but I'd like to do it wirelessly. They are strobe lights at changing strobe rates from 10-50Hz so that means accuracy should really be better than 10ms or else they rapidly (minutes) get too far out of phase and interfere with each other.
Problem is, most protocols have too much latency for this to work reliably -- the solution I can find online suggests using the NRF24L01 over SPI to the ESP32 for this function, but that seems like something the ESP32 surely must be able to do with an entire second core...
Is this impossible? I feel ridiculous having two separate transceivers on one board when the one I'm adding is even lower function! Can I use the ESP32 to receive and interpret wireless information faster than say 1-2ms from reception? I'm happy to use something way lower level than wifi or bluetooth, I'll just have one transmitter sending some byte with a code that each other light will receive and if the code matches the reference it'll increment the state. At least it won't drift... but even a few ms of delay between them will be visibly annoying due to the nature of the strobing.