NRF24LO1+ JOYSTICK CONTROLLED SERVOS

I am working on a project for my 4 year capstone and I need to design a pan and tilt device controlled from at least 15 meters away. The code I used is a little different then traditional because of the addressing(no const uint64_t pipe). I need the arduino to control 2 receivers. So 1 master and 2 slaves. Should I use a proper pipe address (i.e. send_pipe=0xB01DFACECEL) or can I continue to use this much simpler method

{radio.openReadingPipe(1,addresses[0]);} Maybe do radio.openWritingPipe(addresses[2])

then {radio.openReadingPipe(1,addresses[2]);}

and add a separate receiver. I also am having trouble getting the Servo to stop at a certain point but I think I just have to use function or FOR statement. Just to be clear the program works fine as is. I just need a clean way to add a receiver I could even use the same address because they will not be used at the same time.

If you can help me with my Servo problem too that would be a big help.

receiver_nrf2.ino (1.73 KB)

transmitter_nrf.ino (3.18 KB)

Have a look at this Simple nRF24L01+ Tutorial.

See how simple the addressing is.

There is an example (in Reply #17 IIRC) of a master talking to 2 slaves.

    ForeAft.write(0);         // set servo to mid-point

The mid point is 90 degrees

This won't work

if(radio.available()){
        radio.read(&ForeAft_Output,sizeof(ForeAft_Output));
        radio.read(&LeftRight_Output,sizeof(ForeAft_Output));

because there in only one message to read when the radio is available - the message can contain up to 32 bytes of data which you could split between different servos AFTER getting the message from the nRF24

...R