Wordclocks have become quite common, but prices go up to 6, 000 and more.
What has to be inside? Just a number of addressable LEDs and some processor. Maybe a realtime clock or WLAN to obtain the actual time. And some mechanics, a frame and a fixed mask to show the letters. To get such a mask, just have a look at the online offers. An easy way to install a huge number of LEDs is to use a WS2812 matrix with 256 LEDs. Now you have to print the mask so that each letter is situated precisely on top of an LED, transparent paper would be nice. The next part is the software. The positions of all the words have to be stored as data. And some algorithm has to determine which words have to be shown to display a certain time. This is not easy and it will need a lot of switch cases.
What is worse: in case you want to install it for different language, you have to start from scratch and redesign the words mask. Can you understand, that at a certain step I decided not to continue?
But as I already had built the frame and the housing I did not want to leave it unfinished. I completely modified the concept and used the LED matrix to display the figures in order to show the actual time. As I did not remove the mask you still see the letters being lit up, and you can still read the texts written in German.
For each figure, a 4x10 matrix was defined as an array of four int values, each bit representing one LED. The left-most digit will never exceed 1 so the width of one pixel will fit. The time 20:00 will be shown as 08:00, and the leading zero will not be shown.
I attach the code that I started with for the real wordclock in case someone is willing to complete it.
And I attach also the code for the working one. As no real clock is installed, it will start showing 00:00 and using millis() as a time keeper. This can be replaced by whatever you got.
Comments
Please log in or sign up to comment.