Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SEND - ATTINY85
- #define CE_PIN 3
- #define CSN_PIN 4
- #include "RF24.h"
- RF24 radio(CE_PIN, CSN_PIN);
- const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
- unsigned long Command = 1;
- void setup()
- radio.begin();
- radio.setRetries(15,15);
- radio.openReadingPipe(1,pipes[1]);
- radio.startListening();
- radio.printDetails();
- radio.openWritingPipe(pipes[0]);
- radio.openReadingPipe(1,pipes[1]);
- radio.stopListening();
- }
- void loop(void)
- {
- radio.stopListening();
- radio.write( &Command, sizeof(unsigned long) );
- radio.startListening();
- Command++;
- delay(1000);
- }
Add Comment
Please, Sign In to add comment