IoT - Clock

Clock, based on a adafruit neopixel ring and particle photon

Similar projects worth following
The idea was to do something with a Particle Photon I got from a friend of mine. After a bit of reading through the documentation I decided to build a clock. You know, Mr. Obama likes people who build clocks.

I then got a Adafruit Neopixel ring. There is one with 60 pixels. This calls for a clock as well.

The case I built at the local fablab, there was some leftover MDF and Plexiglass, exactly the size i needed.

Finally I somehow managed to build a Python webapp, running on google app engine to control the whole thing, cause Particle Photon and IoT.


It can be controlled trough webrequest. Available Parameters at the moment:

  • Mode
  • Hue of the hands
  • Brightness

It can return

Then there is a request which triggers an alert, filling up the whole ring with a given color, and empy it again. Cool to use from IFTTT.

The different modes

Binary mode00000000000000001
Reverse mode0000000011111111x
Draw trail0000111100001111x
Draw seconds hand not every second0011001100110011x
Seconds hands hue according to it's position0101010101010101x


Possible requests are:


  • setHHue sets hue for the hours hand (0-359)
  • setMHue sets hue for the minutes hand (0-359)
  • setSHue sets hue for the seconds hand (0-359)
  • setHaMode sets the mode, see table (0-16)
  • setBright sets the brightness (1-150)
  • alert triggers an alert in the given hue (0-359)
  • rndMode sets random mode and hues (parameter is ignored, but should be sent (Particle wants it))
  • tellTime tells the hour, was for debug purposes, will disappear or altered soonish.


  • getHHue returns hue for the hours hand
  • getMHue returns hue for the minutes hand
  • getSHue returns hue for the seconds hand
  • getHaMode returns the mode, see table
  • getBright returns the brightness
  • getWifi returns the SSID of the network, the clock is connected to
  • getConfig returns the hues, brightness and the mode in a compact form

Webrequest examples

POST to set the mode to 8:

curl -d access_token=ACCESS_TOKEN -d params=8  

POST to set random mode:

curl -d access_token=ACCESS_TOKEN -d params=0

GET to get the hand mode


  • 1 × Particle Photon
  • 1 × Neopixel Ring 60 Pixel
  • 1 × Leftover MDF
  • 1 × Leftover Plexiglass
  • 1 × Hotglue

  • DHT

    Tillo12/15/2015 at 23:32 0 comments

    Since I had a DHT sensor at home and this clock needs wifi anyway, i tought i can use the sensor to measure temperature and humidity and put it to thingspeak. It's done way to often I know, but not at a clock.

    Plus, because of 60 neopixels I decided to place the sensor on the outside. Gives the case a hacky look.

    Code will be updated when it runs fine.

View project log

  • 1
    Step 1

    Get yourself a Particle Photon and a Adafruit Neopixel Ring (this is only a fourth of it, so you need four of them).

    Solder those parts together.

    Connect the ring and the photon. Ring GND goes to photon GND, ring 5V goes to photon VIN, ring signal goes to photon D2

  • 2
    Step 2

    Set up the Photon, see here. Set up the appengine, see here.

  • 3
    Step 3

    Get the firmware for the Photon and the webapp.
    There is a file called your_config.json in the webapp directory. Use your own values for Particle_ID and Access_Token and rename it to config.json.

    ... Profit ;

View all 3 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates