be installed before being used.
See Resources for info on how to
get the library and install it. Code
to control the ChronoDot RTC
and the RGB LED strips is
embedded in the ino (or sketch)
Once you have the clock
files and have installed the
IRremote library, you should be
able to bring up the Arduino IDE
and load the code. Make sure
you select the Arduino Uno
board type from the Tools menu
or you will have issues. If you
click the Verify button and don’t
see any errors, you should be
able to click the Upload button
to program your Arduino.
If all is well, the clock should
go into the clock display mode
(more on this in a bit) and you
should be good to go.
The best way to understand
the code is to examine the
sketch file in detail. There isn’t
enough space in this article to
give a detailed description of
how the code works, but I will
give you a quick rundown.
All Arduino sketches have
two entry points: setup() and
loop(). In our setup() function, all
Arduino I/O pins are configured
for interacting with the external
March 2014 35
ITEM SUPPLIER COMMENTS
Arduino Uno microcontroller eBay, adafruit.com, mcmelectronics.com, Other Arduinos could be used but the
ChronoDot ultra precise RTC ID: 255 adafruit.com Comes with battery
Digital RGB LED strip portion* ID: 306 adafruit.com Two LEDs in length for the toggling LEDs
Digital RGB LED strip portion* ID: 306 adafruit.com 12 LEDs in length for the clock LEDs
IR detector/sensor RadioShack IR receiver #2760640 or
Adafruit model TSOP38238 ID: 157
21-key IR remote control ID: 389 Other remotes could be used but Arduino
sketch would need to change
USB power supply Must be capable of around one amp at five
USB to Arduino cable Sometimes provided with Arduino Uno
*LED strip is sold in one meter lengths of 32 LEDs. Since a total of 14 LEDs are used in this clock project, you can make two clocks
with a one meter length and still have some left over for other projects.
Adafruit has a tutorial on how to safely cut the LED strip into sections. See
http://learn.adafruit.com/digital-led-strip/advanced-separating-strips. PARTS LIST
■ PHOTO 2. LED clock base detail. Base made from three
4" smokey colored acrylic discs, some spacers, and long screws.
IR detector is positioned vertically on the right of the
white spacer, facing forward.