   pixels.show();
   button.setup();
   Serial.begin(9600);
-  Serial.println("Hello");
+  setSyncProvider(RTC.get);
+  if (timeStatus() != timeSet) {
+    Serial.println("Unable to sync with RTC");
+  } else {
+    Serial.println("RTC has set the system time");
+  }
 }
 
 void loop()
 {
+  static uint32_t lastColour = 0;
+  static byte on = false;
+  static byte lastHeld = false;
+  
   button.read();
   
   if (button.pressed()) {
     on = !on;
     if (on) {
       Serial.println("Turning on");
-      for (int i = 0; i != pixels.numPixels(); ++i) {
-        pixels.setPixelColor(i, nightlight.colour());
-      }
     } else {
       Serial.println("Turning off");
       pixels.clear();
+      pixels.show();
     }
-    pixels.show();
   }
   
   const byte held = button.held();

#include <Adafruit_NeoPixel.h>

#define PIXEL_PIN   13    // Digital IO pin connected to the NeoPixels.
#define PIXEL_COUNT 22

    }
  }
  
  const uint32_t colour = nightlight.colour();
  if (lastColour != colour) {
    for (int i = 0; i != pixels.numPixels(); ++i) {
        pixels.setPixelColor(i, colour);
    }
    pixels.show();
    lastColour = colour;
  }
  
  delay(10);
}

