 #include <OneWire.h>
+#include <Time.h>
 
 #define LED 13
 #define TEMPPIN 2
 #define SERIAL_BAUD   9600
+#define TIME_HEADER  "T"   // Header tag for serial time sync message
+#define TIME_REQUEST  7    // ASCII bell character requests a time sync message 
+
 
 void setup(void) {
   Serial.begin(SERIAL_BAUD);
+  setSyncProvider( requestSync);  // Syncing for timestamp
 }
 
 void loop(void) {
+  
+  if (Serial.available()) {
+    processSyncMessage();
+  } else {
+    Serial.println("No time sync");
+  }
+
   for (int i=9;i<13;i++){
   handleOWIO(TEMPPIN,i);
   Serial.println();
 }
 
-delay(1000);
+  delay(1000);
   Blink(LED,3);
 }
 

  delay(DELAY_MS);
  digitalWrite(PIN,LOW);
}

  OneWire myds(owpin);
  getfirstdsadd(myds,dsaddr);

  Serial.print(now());
  Serial.print(F("dsaddress:"));
  int j;
  for (j=0;j<8;j++) {
