Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include "nRF24L01.h"
- #include "RF24.h"
- int msg[256];
- RF24 radio(8,7);
- const uint64_t pipe = 0xE8E8F0F0E1LL;
- void setup(){
- Serial.begin(9600);
- radio.begin();
- radio.openWritingPipe(pipe);
- }
- void loop(){
- int x = analogRead(A0);
- msg[0] = x;
- radio.write(msg, 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement