Home > Fun, Web Code > Grid Clock – An Experiment

Grid Clock – An Experiment

June 29th, 2012

This is a Javascript version of a Grid Clock I had fun making for myself on a train trip home last week. I tried to waste as few characters as possible. The clock is built without using any libraries or external files (you can view the code by just selecting view source).

The clock is inspired by Qlocktwo, but this clock uses the letters in the grid far more efficiently, allowing it to overlap words that share letters (that won’t be displayed at the same time) and display additional information such as noon, midnight, am, pm, just, almost, and past. This clock uses almost for the last three minutes before the hour, and just past for the first three minutes past the hour. Click read more below for Processing/Arduino info.

The code is written in a way that makes it easy to port to a language that will allow me to control LEDs. The logic results in an array of numbers representing cells numbered from 1 to 110 that should be turned on.
If you are looking for the same code for an Arduino project, I have the logic ported to Processing available here, but I haven’t bought any LEDs yet. Porting this to control digitally addressable LEDs should be pretty easy. I expect that constructing a physical container that will look good on my wall, and allowing the time to be set with buttons will be a little trickier.

Fun, Web Code

  1. No comments yet.
  1. No trackbacks yet.