Run command from multiple arduinos at the same time synchronizing by nRF24L01+

Hello all.

I'm new to forum, so welcome everyone.

So firstly about the project. I have 1 master that have sonar that emit ultrasound and 5 sonars that only receive ultrasound (i have cut wire for emission). The main problem is when sonar emit ultrasound it waits 38 milliseconds in order to receive "reflected" sound, but in my project 5 sonars waiting for receiving. So when command "measure" come to the master, master might check all slaves in order to start measure distances from other sonars, and i need to run command on all arduinos at the same time in order to avoid errors in measurements. After measurements will have completed all data from 5 slaves about measurements distances have to come to the master and from master to PC. I can't run these commands at the same time, is it possible to synchronize time or commands by nRF24L01+?

Please, any help will be appreciated.

You could certainly arrange for a master nRF24 to send a short message that is received by several slaves all listening on the same address.

You would probably need to do some measurements to determine the length of time between the master starting the sonar ping and the slaves receiving the message.

If more than one slave is listening on the same address then you can't use the auto-acknowledgement feature and I presume that means the master only sends the message once which will increase the chance that a slave won't receive it. I have no idea whether that would be very likely or very improbable. A lot will depend on the local environment and interference from other devices such as Wifi.

...R
Simple nRF24L01+ Tutorial

Firstly, thanks for answer.

Sorry that i messed up. I have one master and 6 slaves. One slave have sonar that emit and others 5 only receiving. So all slaves are receiving command in order to start measuring, but they all starting command not at the same time. And it is working in cycle but master could send command on slaves with delay, for instance every 500 ms or without delay.

When each nRF24 read data from one pipe, Are they reading all data at the same time or one after another?

icegas:
When each nRF24 read data from one pipe, Are they reading all data at the same time or one after another?

Think about it.

The master will send a single message that lasts maybe 1 millisec. How could the slaves do anything but read the data all at the same time.

Don't mix up pipes and addresses - unfortunately some demo code uses the name "pipe" for the variable that holds the address. You have no need to use more than one pipe so you can completely ignore the concept of pipes.

...R