Skip to content

Instantly share code, notes, and snippets.

@marcokeur marcokeur/rfLighthouse.ino
Last active Dec 16, 2015

Embed
What would you like to do?
RF Lighthouse sourcecode
#include <JeeLib.h>
MilliTimer sendTimer;
char payload[] = "PONG";
byte needToSend;
void setup () {
Serial.begin(57600);
Serial.print("RF Lighthouse -");
rf12_config();
}
void loop () {
if (rf12_recvDone() && rf12_crc == 0) {
//done something with received shizzle
}
if (sendTimer.poll(3000))
needToSend = 1;
if (needToSend && rf12_canSend()) {
needToSend = 0;
rf12_sendStart(0, payload, sizeof payload);
Serial.println("PONG");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.