Using nRF24L01+ to sync timing

Hello!

I am working on a laser gateway project. Basically, I have two square arches with lasers and photoresistors in the center. For the project, there will be 2 of these laser gateways, used to time the speed of little robots. An object will pass through gate A, starting a timer, and when the object passes through gate B, the timer stops and displays the total time passed.So far, I have been able to write the code to detect and notify when one of the lasers are broken. I'm currently stuck on programming the nRF24L01+ modules in. Because the arduinos measure time from their own internal clocks and their is possible lag/data loss between the gate (max distance of 50ft), need the gateways to be able to communicate back and forth. I've spent a couple of hours now trying to understand the RF24 library and have literally no success.

I know exactly what needs to be done, I'm just not sure how to program it into happening.

Have you been able to get the sample nRF24L01 program to work? Could the problem be with how you are powering the modules?

Paul

Have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.

A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.

...R

GPS modules with pulse per second output are very cheap and can be used to synch the time base of remote systems. I connect the PPS signal to a pin that provides interrupt capability. When a PPS comes in I immediately set the timer counter to zero and record the current time from the NMEA stream, down to the second resolution. When an event occurs that I want to time the system broadcasts the counter value and the time PPS arrived, ie the time down to the second that the clock was zero'ed.

The combination of the clock count and time it was zero'ed from different systems provides for a common time base.