Word Clock

Code for a simple DIY-version of the famous Word Clock based on a NodeMCU ESP8266 development board and Adafruit NeoPixels LED strip.

Components


Be very carefull when putting the adhesive film on the frosted acrylic to prevent air bubbles.


The LED strip needs to be cut and rearranged in a zig-zag pattern and reconnected with jumper cables. I've also put a piece of cardboard with holes on top of the LEDs so the light from one LED will be directed towards a single letter, and not spread to adjacent ones.


I've also added a battery holder as power supply but it turns out on longer usage they are getting too weak too fast. So as far as you don't want to change the batteries every day the micro usb cable as power supply is the better way to go.

Breadboard:

See Adafruit guide for more information.

NodeMCU code

The NodeMCU is the brain of the clock and is written in the Arduino environment.
It connects to the local wifi via SSID and password and sets up a web sockets server to enable a real time connection between a client app and itself. After the connection is established it is possible to adjust the color and brightness of the LED strip. When the connection is closed the NodeMCU stores the adjusted values into its EPROM and retrieves them from now on after every boot.
To display the time the NodeMCU queries the current time in an interval of 10 seconds from a NTP server, transforms it into a human readable sentence and enlightens the corresponding LEDs.

The following libraries are beeing used:

Android & iOS client

The clients provide the possibility to connect to the clock via the local wifi. After the connection is established it is possible to adjust the color and brightness of the LED strip in real time. There is also a Nightmode which decreases the brightness of the LEDs according to the configured value and time to save some energy. The clients are build with the crossplatform solution provided by Xamarin.

The following libraries are beeing used:

Demo

Demo