Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include <nRF24L01.h>
- #include <RF24.h>
- RF24 radio(7, 8); // CE, CSN
- const byte repeater1 = "00001";
- const byte device = "00002";
- void setup() {
- }
- void loop() {
- If(gomb megnyom) {
- radio.begin();
- radio.openWritingPipe(address);
- radio.setPALevel(RF24_PA_MIN);
- radio.stopListening();
- const char text[] = "uzenet";
- radio.write(&text, sizeof(text));
- delay(1000);
- radio.begin();
- radio.openWritingPipe(address2);
- radio.setPALevel(RF24_PA_MIN);
- radio.stopListening();
- const char text[] = "uzenet";
- radio.write(&text, sizeof(text));
- delay(1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement