 #endif
 
 // Start time in milli-seconds
-const uint32_t START = 0xfffff000UL;
+const uint32_t START = 8 * 3600 * 1000UL;
+
+// Use the Real-Time Clock
+RTC::Clock clock;
 
 void setup()
 {

  RTC::begin();
  Watchdog::millis(START);
  RTC::millis(START);
}

void loop()
{
  // Sample every 2 seconds
  sleep(2);

  // Read and print humidity and temperature
#if !defined(NO_INDOORS)
  trace << hex << RTC::micros() << PSTR(":indoors: ");
  if (indoors.sample())
    trace << indoors;
  else
    trace << PSTR("failed");
  trace << endl;
#endif
  trace << hex << RTC::micros() << PSTR(":outdoors: ");
  if (outdoors.sample())
    trace << outdoors;
  else
    trace << PSTR("failed");
  trace << endl;
}

#include "Cosa/IOStream/Driver/UART.hh"
#include "Cosa/RTC.hh"
#include "Cosa/Watchdog.hh"
#include "Cosa/Time.hh"
#include "Cosa/Periodic.hh"

// Configuration
#define NO_INDOORS
