Skip to content

Commit

Permalink
add range tx example from JeeLib
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrake committed Mar 22, 2012
1 parent 8a66245 commit 667c0cb
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/JeenodeRangeTx/JeenodeRangeTx.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Transmit sketch used to report quality of reception.
// 2011-05-14 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php

// Based on a sample implementation by Steve Evans (@tankslappa).

#include <JeeLib.h>

byte outData, pending;
MilliTimer sendTimer;

void setup() {
rf12_initialize('T', RF12_868MHZ, 88);
}

void loop() {
rf12_recvDone();

if (sendTimer.poll(100)) {
++outData;
pending = 1;
}

if (pending && rf12_canSend()) {
rf12_sendStart(0, &outData, sizeof outData);
pending = 0;
}
}

0 comments on commit 667c0cb

Please sign in to comment.