KiZD

emontx_lib.ino

Sep 14th, 2013
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void send_rf_data()
  2. {
  3. rf12_sleep(RF12_WAKEUP);
  4. // if ready to send + exit loop if it gets stuck as it seems too
  5. int i = 0; while (!rf12_canSend() && i<10) {rf12_recvDone(); i++;}
  6. rf12_sendStart(0, &emontx, sizeof emontx);
  7. // set the sync mode to 2 if the fuses are still the Arduino default
  8. // mode 3 (full powerdown) can only be used with 258 CK startup fuses
  9. //rf12_sendWait(2);
  10. //rf12_sleep(RF12_SLEEP);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment