Programming ClockTHREEjr_v2

At some point, you may wish to re-program your ClockTHREEjr_v2 or maybe you are building a clock from scratch.  This post will walk you through the steps.

Outline:

  1. Download and install Arduino for your target platform.  (More details can be found here.)
    • Navigate to the Arduino download site: http://arduino.cc/en/Main/Software
    • Download Arduino for your platform.
    • Unzip the file to the directory of your choice.  (We will refer to whatever directory you choose as <arduino_dir>).  I use c:\arduino\ on Windows or /home/justin/arduino/ on Linux so that (for arduino 1.0 for instance) the path extracted executable is c:\arduino\arduino-1.0\arduino.exe on Windows or /home/justin/arduino/arduino-1.0/arduino on Linux.
  2. Download and install ClockTHREE source code
    • Download the latest ClockTHREE library source code file from here: http://code.google.com/p/clockthree/downloads/list
    • Unzip the library source code file in your home directory. I use “My Documents\sketechbook\” on windows and /home/justin/sketchbook/ on linux.  We will refer to the directory you choose as <sketchbook>.
  3. IMPORTANT: Point Arduino to your newly extracted library files.
    • Start arduino (look here if you have trouble with this step)
    • Click File->Preferences to pull up the preferences menu.
    • Leave “Use external editor” unchecked if you plan on using Arduino as your editor.
    • Click the “Browse” button and navigate to your <sketchbook> directory from step 2.
    • Click “OK”.
    • Close and restart Arduino
    • Click “File->Sketchbook->libraries”.  If “ClockTHREE” is listed you’ve done well.
  4. Using a text editor, edit source code:
    • On or about line 32 of <sketchbook>/libraries/ClockTHREE/examples/ClockTHREE_04/ClockTHREE_04.ino, comment out all but one of the following lines depending on language and hardware.
    // #include "dutch_v1.h"
    // #include "english_v0.h"
    // #include "english_v2.h"
    #include "english_v3.h"
    // #include "french_v1.h"
    // #include "german_v1.h"
    // #include "german_v3.h"
    // #include "german_v5.h"
    // #include "hebrew_v1.h"
  5. Compile and upload
    • Connect the FTDI cable to ClockTHREE (mind color labels) and to your computer.
    • Click Tools->Boards->Duemilanove
    • Select USB port Tools->Serial Port (this may take some trial and error if you have several devices connected).
    • Compile and upload <sketchbook>/libraries/ClockTHREE/examples/ClockTHREE_04/ClockTHREE_04.ino.
      Click the arrow button, second from the right.  
  6. Congratulations!  That is it.  Now you can customize the code to your hearts content!

Leave a Reply