I would like to sync multiple Photons/RFduino's or whatever wireless board (of course with

I would like to sync multiple Photons/RFduino’s or whatever wireless board (of course with FastLED and strips) with the same Noise pattern. They will be spread in a room (so wire is not an option). Because of clock drift I’m thinking in a good way to keep them in sync.

My main idea is to have on master that broadcasts some timing variables to other slaves. It could be millis, but als the uint32_t perlin value.

Broadcasting also takes time and with UDP you can miss some messages. So you don’t want slaves to wait on a new package, but just continue.

I think accuracy of 500ms would be good enough, so this might not be an issue.

Any ideas on this subject? I’m just exploring the possibilities.

I’ve found this example to sync to Arduino’s (over i2c), which might be a good startpoint:
https://aaka.sh/patel/2013/12/23/synchronizing-micros-millis-arduino/
https://aaka.sh/patel/2013/12/23/synchronizing-micros-millis-arduino

Hi, would be nice to hear from your progress. Had the same idea to sync multiple mood lights. But have not found the time to start the project.

Syncing time seems better than noise values as a remote micro can keep counting millis after missing one or more messages, but it would be more difficult to transparently recover from missing noise values.

One idea: make the sync message go roundtrip from controller to remote, and have the controller keep track of the average round trip time. The remote can use half of the roundtrip time for syncing.

@Louis_Beaudoin Roundtrip time is a nice idea. Did you already once used something like this?

I was planning to use the noise input value (in this case the time value), since it’s perlin noise I can keep counting that one as well. That might even be easier, because otherwise I have to calculate it from the millis() value.

@Kasper_Kamperman No, I haven’t used this. I probably read about it somewhere, but don’t remember where.

I did some research. NTP has a fractional part (32bit), so a precision of picoseconds. So doing NTP requests on each slave might be enough to run the millis with a certain precision.

OSC also has a time tag. They use the same 64bit value as NTP. There is an Arduino/Teensy implementation that support time tags, however synchronisation isn’t worked out. The creator pointed me to a paper where they tested synchronisation. There is one master and several slaves. This is not yet implemented in Arduino:

I think I go first for a solution to share my perlin value with slaves. However the OSC system is really interesting.