Permalink
Browse files

Add NTP Transmit via RFM12B

  • Loading branch information...
1 parent ac365e1 commit abe048ff3f07765559ed1da9c87c8611ed75eed7 @nathanchantrell committed Aug 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 TinyTX_MAX1284_emoncms/TinyTX_MAX1284_emoncms.ino
@@ -34,7 +34,7 @@
IPAddress timeServer(192, 43, 244, 18); // time.nist.gov NTP server
byte packetBuffer[ NTP_PACKET_SIZE]; // Buffer to hold incoming and outgoing packets
EthernetUDP Udp; // A UDP instance to let us send and receive packets over UDP
-unsigned long time60s = -50000; // for time transmit function
+unsigned long timeTX = -50000; // for time transmit function
#define ledPin 15 // MAX1284 LED on Pin 15 / PD7
@@ -129,9 +129,9 @@ void setup () {
void loop () {
#ifdef USE_NTP
- if ((millis()-time60s)>60000){ // Send NTP ime once a minute
+ if ((millis()-timeTX)>(NTP_PERIOD*60000)){ // Send NTP time
getTime();
- time60s = millis();
+ timeTX = millis();
}
#endif

0 comments on commit abe048f

Please sign in to comment.