Ruby binary clock
As soon as I got my hands on the Pi, I knew I needed to exploit those GPIO pins and do something I'd never attempted before; light up some LEDs, whee!
The result of my hackery, Ruby RPi Binary Clock, uses WiringPi, Ruby and a copious amount of LEDs and jump leads to create a 14 LED binary clock that shows the hour, minutes and day of the week.
Here's a snippet of the code:
# A small snippet from clock.rb # showing the dec->binary conversion @@mydays.each do |number,led| if day >= number Gpio.write(led,ON) day = day - number sleep(delay) slept = slept + delay end break unless day > 0 end