Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // RX
- #include <SPI.h>
- #include "nRF24L01.h"
- #include "RF24.h"
- #include <printf.h>
- RF24 radio(7, 8);
- const uint64_t addr = 0x0a0c0a0c0aLL;
- char msg[100];
- void setup(){
- Serial.begin(9600);
- radio.begin();
- printf_begin();
- radio.openReadingPipe(1, addr);
- radio.startListening();
- radio.printDetails();
- delay(1000);
- }
- void loop(){
- if(radio.available()){
- radio.read(msg, sizeof(msg));
- Serial.println(msg);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement