Now that our O-Watch can display the time in a bunch of different ways, we're ready to mash them all together into one!
It is strongly recommended that you get the previous Simple RTC Watch working before trying this.
You can select the display type by pressing the lower-left button; each time you press it, your O-Watch will display the next watch face, including:
- Simple Digital Watch
- Word Clock
- Bob S' awesome Matrix-style Animated Word Clock
- Retro-style Vector Watch
- Googly Eyes Watch
- (Bonus!) Scrolling Text Banner Watch
- (More Bonus!) Bobby's Blue Police Box Watch
- (Inconceivable Bonus!) Config Screens
- Binary Watch
- Simple Analog Watch
- Time-of-day Color Watch
- Neko scamper-kitten Watch
Wow, that's a lot of different styles!
And a lot of code all broken out into one .INO file plus a bunch of .cpp and .h files to make it go. (Argh, yes, the code is refactored but could still use more.) But the cool thing about code is that once it's compiled down, it's pretty small, so all together we're still only using 1/4 of the O-Watch's storage.
To make things consistent and to make the animations smooth, ALL of the watch faces now do all of their drawing to a screen buffer and then send everything at once to the TinyScreen.
A few of the watch faces do something interesting when you press the upper-left button. Try them and find out!
A primitive debounce routine (similar in concept to this one) helps keep our buttons clicking smoothly and without false clicks.
Included in the configuration screens is the ability to do a soft reset of the O-Watch. This will effectively call the setup() routine, but won't clear the global variables. It uses the CMSIS NVIC systemReset() call to reset the Arduino Zero and its peripherals. If this causes problems for your O-Watch, you can comment out the
#define CONFIG_RESET
line to turn it off.
Also included in the configuration screens is the 'Hack!' screen. You can use this to set your O-Watch fairly accurately:
- First set and save the current hour and date.
- Next set and save the minute to one or two minutes from now. Look at an accurate time source like your computer or smartphone to set the minutes, but be sure to set the minutes on the O-Watch a minute or two ahead.
- Go to the Hack! screen, and wait with your finger on the Hack! button while keeping an eye on your computer or smartwatch time. But don't press it.
- The O-Watch time will 'freeze' at the hours and minutes you saved (and 00 seconds) until you press the Hack! button.
- As soon as the minutes shown on your computer or smartwatch match what you saved on your O-Watch, press the Hack! button.
- Your O-Watch will now be set to within a second of your computer or smartwatch time. That's pretty accurate!
OR! You and your friends can SYNCHRONIZE WATCHES!
To start you (or the leader of your posse) will yell out
OK! PREPARE TO SYNCHRONIZE WATCHES!
This won't work if you don't yell. So, yell out
SET TIME TO ELEVEN FIFTEEN!
(or whatever the time is a few minutes from now).
You and everyone else will set and save the hours and minutes to 11:15 (or whatever time is yelled out).
Next yell out
READY!
And everyone will yell YES! or NO! depending on if they've set their hours and minutes yet.
Now yell out
HACK ON MY MARK!
Everyone will go to the Hack! screen on their watches and put their fingers on the Hack! buttons. Finally, yell out
HACK!
And everyone will press their Hack! buttons all at the same time. Now your watches are all synchronized, and you're all ready to go on Secret Agent missions together!
Comments