Sunday, June 13, 2010

Arduino Nokia 6100 LCD Analog Clock Demo


I needed a RJ11 connector for my Datalogger project so I took the opportunity to get the Nokia 6100 LCD Shield from Sparkfun. I created an Analog Clock demo to check out the capabilities of the LCD.

Using the Sparkfun base driver ported by Mark Sproul to the Arduino as a foundation, I incorporated Jim Lynch's Nokia 6100 LCD tutorial graphics primitives and ASCII character code.

The iButton clock code was reused from the iButton data logger programmer project and modified to support the DS1904 with onboard clock and battery. It is only around $6, which is much cheaper the DS1994 that also had onboard memory. I soldered a 4.7 kOhm pull up resistor directly to the iButton holder to avoid the need for a bread board.

The clock tick marks and hands were drawn using cylindrical coordinates:
- X position = radius * cos (angle)
- Y position = radius * sin (angle)

The time defaults to 9:40 am which can be changed to anything you want if the real time iButton clock is not attached.

Here is a link to the source code.

Demo Video: