So I’m attempting to make a basic digital wristwatch that I will eventually turn into a sailing timer (thats another story), and I’ve currently managed to make it show the time using 4 multiplexed seven segment displays by implementing the millis() function. I’ve run into some problems and wasn’t sure if anyone could offer help.
I’m currently testing this on an arduino uno on a breadboard with four seven segment displays and a set of switches.
The fundamental problem:
Using millis() sucks because it cant be reset. I want to have the typical clock/countdown timer/chronograph functionality, but I really cant figure out how to do it with millis() so I found this: http://arduino.cc/playground/Code/Timer1 but frankly I dont know how to use it for what I want.
Changing mode: I’m trying to just write a program that will cycle through a few different arbitrary modes (ie one showing 0000 on the display) while keeping the time in the first mode intact. I can’t do it well…
Distinguishing from holding and tapping a button: a typical wristwatch adds a whole different set of commands by holding a button versus tapping it. this would be easy if I could use delay() but I cant because It ruins my multiplexer code and stops the display…
Any tips would be very helpful, as I’ve been scratching my head. This is my first real project…
I decided to go about making this by first making two seperate programs, one that just tells the time and one that counts down from five minutes.
I’ve attached those two programs… Clock Prototype counters is just a functional clock that can be set using some switches, Clock Prototype Timer is the timer part, which counts down from 5 minutes, badly… It jitters on some digits and once it reaches 4 minutes it stops working and shows all 0’s
If you want to see how someone better than me made a basic wristwatch, heres the code for the BigTime kit from Sparkfun, which I will eventually be hacking for this:
Clock_Prototype_Timer.ino (3.11 KB)
CLOCK_Prototype_Counters.ino (4.76 KB)