loading

Making a kids night clock using a sparkcore and an internet button shield. (Any neopixel strip mounted in a circle would do).

The idea behind this project was to have something that my 4-year-old could look at and instantly know if it was time to get up, or if she should stay in bed. Also giving her a reference for how much time "five minutes for bedtime reading" really is.

Components:

  • Sparkcore
  • "Internet button" shield
  • Postcard from ewian.com
  • Cardboard
  • double sided tape
  • some semi-transparent diffusing plastic material
  • Power bank or USB charger

Tools:

  • Scissors
  • paper knife
  • spark.io

The idea is to have the surface of the clock light up in blue color when it's daytime, and red or green color when it's night. We'll also use the 11 leds distributed around the clock to show the time, using one color for hours, another for minutes and a third for seconds.

The 11 leds are distributed around the clock as if there were a twelfth led.

It'll use network syncronized time, and have a presicion of 5 minutes or 5 seconds on the leds. (12 positions)

Step 1: Programming the Sparkcore

I assume you've already managed to connect your sparkcore to spark.io, and are ready to code in their online editor.

My code for this project is available on GitHub. You have permission to use this code under the AGPL 3.0 license or later.

It uses the SparkTime library to syncronize ntp time and the adafruit neopixel library to control the neopixel array.

Both of these libraries are avaliable through the library search at spark.io, so find them, and add them to your project.

With these two libraries added, you can use the code from my project. Note that you may want to change the timezone offset

rtc.setTimeZone(1); // gmt offset

You might also want to choose a different set of colors.

<p>Great idea! </p><p>That phrase (or multiple variations of it) are spoken nightly at my house. </p>

About This Instructable

860views

7favorites

License:

More by BårdA:The go the f* to sleep guardian angel project 
Add instructable to: