Code for LED watch using Teensy 3.0

Hi, I am working on a watch project but I am stuck trying to understand the code to get it up and running. I honestly have no idea where to begin but I feel as though someone with more experience with Arduino programming might be able to direct me as to how to accomplish what I am trying to do.

I decided to base my project around the teensy as it has a built-in RTC and a large number of inputs and outputs. I have the 32.768 kHz crystal soldered to the bottom of the board and a battery connected to run the RTC. My project is restrained to displaying time on 16 LEDs so I figured the best method to read the time would be as follows.

-A button is pressed on the side of the watch and only the hour from 1 to 12 is displayed using 12 LEDs while the remaining 4 LEDs indicate AM/PM
-The same button is pressed a second time to display the minutes from 0 to 59 by allowing the 12 LED section to represent 5 minutes per LED and the 4 LED section to represent 1 minute per LED

In example if it was 6:58AM

  • the first button press would light 6 out of the 12 in the LED Hours section and the middle four LEDs would all blink
  • the second button press would light 11 out of the 12 in the LED section (each representing 5 minutes) and 3 LEDs out of the 4 LED section would be lit (each representing one minute). This would yield 58 due to 5x11=55 and 3x1=3 and 55+3=58

-The additional button on the watch would be used to adjust the time by advancing the hours/minutes forward at an increased rate until the desired time was displayed. This function would run if the button was held down for say 5 seconds to prevent accidental time adjustment.

If you could point me to some examples that might help me or just give me a general idea of the structure of code to use I would be extremely grateful. How do you get the microcontroller to talk to its own RTC and convert that information to turning on and off outputs?

You would be better off posting this in the PJRC forum which is specifically for Teensys.

[edit] I think there are a few threads there about how to use the RTC in the Teensy 3. Search for them.