Depending on usage frequency, may get the occasional collision where both test for availability at the same time - if occurring too frequently, maybe add something simple like one arduino only does time updates on even seconds, the other on odd seconds.
https://forum.arduino.cc/index.php?topic=64049.0
I need events executed in the multiple receiving Arduino's to occur in sync (simultaneously). Is there a library or something, probably using the ESP32's RTC, to ensure events occur in sync?
Example system:
- ESP32 sender/master
- Arduino1 receiver controlling LEDs (Christmas lights)
- Arduino2 receiver controlling stepper motors (Mary figure)
- Arduino3 receiver controlling stepper motors (Joseph figure)
The issue is that they are sent data at different times by the user.
Say, the user selects settings for Mary. That data is sent to the ESP32, and then that data is sent to all the Arduinos, but only "gets into" the MaryArduino.
Then, the user selects settings for the lights. That data is sent to the ESP32, and then data is sent to all the Arduinos, but only "gets into the LightsAruino.
Etc.
However, I need everything to start at the same time.
The data is not simultaneously sent. It is sent one after the other, as slow as the user selects their settings. However, the sequence of events must simultaneously occur.