EasyManua.ls Logo

Emakefun RF-NANO - Page 32

Emakefun RF-NANO
34 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Copy right © 2018 Shenzhen Emakefun Technology co., Ltd.
32
Mirf.channel = 10; //Set the used channel
Mirf.config();
Serial.println("Listening..."); //Start listening to received data
}
void loop()
{
Mirf.ceLow();
Mirf.configRegister(RF_CH, 10); //switch channel 10
Mirf.ceHi();
if (Mirf.dataReady()) { //When the program is received, the received data is output from
the serial port
Mirf.getData((byte *) &value);
Serial.print("Receive1 got data is: ");
Serial.println(value);
}
delay(800);
}
Data received by receiving device 1
Figure 3-3-2