 #include "Cosa/Trace.hh"
 #include "Cosa/IOStream/Driver/UART.hh"
 
-// Set the real-time clock
+// Set the extern RTC
 // #define SET_TIME
+
+// Synchronized with external RTC square-ware
+// #define SQUARE_WAVE_CLOCK
 
 // The real-time device, latest start and sample time in ram
 DS1307 rtc;

OutputPin ledPin(Board::LED);

// Clock pin
#if defined(ARDUINO_PRO_MICRO)
InputPin clkPin(Board::D0);
#else
InputPin clkPin(Board::D2);
#endif

void setup()

  static int32_t cycle = 1;

  // Wait for rising edge on clock pin
#if defined(SQUARE_WAVE_CLOCK)
  while (clkPin.is_clear()) yield();
#else
  clock.await();
#endif
  ledPin.set();

  // Read the time from the rtc device and print
