Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Damian Allen
#70102 I need to send a 100 Hz sync signal to multiple ESP8266s so that they strobe some LEDs in time with a camera shutter.

Any thoughts on the best way to achieve this? If I use TCP/IP I'm guessing that the packet routing latency would be too unpredictable. My initial thoughts:

1. Add a NRF24l01 as the a dedicated receiver for the pulse sync signal. My concern here would be the battery drain.
2. Use the raw radio in the ESP rather than the TCP protocol. Problem with this is I need to send standard IP signals as well so I can't see that working.
3. Use the UDP protocol to received a multicast sync in addition to the TCP/IP. Would the ESP8266 be able to handle both UDP and TCP at the same?

Given that the sync pulse is 100Hz and it's for strobing LEDs, I can afford a reasonable number of ms of error, but I need a pretty good consistency. (My other problem is that I need to receive input from two rotary encoders, display to an LCD and send and receive occasional TCP data; I have a feeling I might be asking too much of the poor ESP8266...)
User avatar
By rudy
#70106 I think it should be possible if you structure the code correctly. I would try using an interrupt to initiate the 100Hz signal. I would use multicast UDP. You might want to compare the results with the normal libraries and https://github.com/me-no-dev/ESPAsyncUDP . Also you could go to 160MHz rather than 80MHz clock.

Now the ESP8266 will draw significant power compared to other options.
User avatar
By rudy
#70114 Both send and receive. I would also use the Async webserver code in another of his libraries. But one step at a time. I would first get a timer firing an interrupt and then add the multicast utp send code. Then do the receive side. After you are happy with that then see how you can deal with the encoders and display. However you do It, get the time critical stuff working first.