loading

need help for nrf24l01+

Well i am using rf24 module for a project since i am new to it i am having some difficulties to send the data. Actually i am doing a remote consisting of a geeetech voice module + nrf24 + arduino nano. It must communicate with a hub which comprises of arduino uno + rf24 + relays. I have tested the voice module and the data is read as serial command. see the code for a simple example without rf24 below.

For my project i need to make the transmitter read the serial command of the voice module and send it to the receiver side. In the receiver side it will activate relay with a switch case section. I would appreciate if anyone could help me out and suggest me how to send the command of the geeetech voice module via rf24.

//code for simple test between voice module and nano

int led1 = 2;
int led2 = 3;

byte com = 0;

void setup()

{ Serial.begin(9600);

pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

delay(2000);

Serial.write(0xAA);

Serial.write(0x37);

delay(1000);

Serial.write(0xAA);

Serial.write(0x21); }

void loop()

{ while(Serial.available())

{ com = Serial.read();

switch(com)

{ case 0x11:

digitalWrite (led1, HIGH); //turn red on

break;

case 0x12:

digitalWrite (led2, HIGH); // turn yellow on

break;

case 0x13:

digitalWrite (led1, LOW); // turn red off

break;

case 0x14:

digitalWrite (led2, LOW); // turn yellow off

break;

case 0x15:

digitalWrite (led1, LOW);

digitalWrite (led2, LOW); // turn both off break;

} } }

Picture of need help for nrf24l01+