Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment