Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Receiver */
- #include <SPI.h>
- #include <nRF24L01.h>
- #include <RF24.h>
- RF24 radio(2, 10); // CE, CSN Pins
- const byte address[6] = "00001";
- void setup()
- {
- Serial.begin(9600);
- radio.begin();
- radio.openReadingPipe(1,address);
- radio.setPALevel(RF24_PA_MIN);
- radio.startListening();
- }
- void loop()
- {
- if (radio.available()) {
- Serial.println("available");
- char recvData[32] = {0};
- radio.read(&recvData, sizeof(recvData));
- Serial.println(recvData);
- }
- else {
- Serial.println("Not Available");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement