Hey, everyone! Partly inspired by Ahmed Mohamed, I have made a clock using an Arduino Pro Mini, four MAX7219 LED arrays, a DS3231 real time clock, and a keypad salvaged from an old digital clock. It stores things like whether or not to display military time in the Arduino's EEPROM. So far it has no alarm, but there are a lot of things that can be done to it via the serial terminal, which parses input and responds to commands. The time and date (the latter of which it doesn't normally display, but could be used if I implement an alarm system) can all be set via the keypad, which brings up a simple paging editor that shows a blinking cursor on the data to be edited (this was the trickiest part to implement; with MAX7219s, you have to handle cursors all by yourself).
The source is attached
and you can watch video of it here:
Commands that can be issued via the serial terminal (at 19200 baud!) include:
ae - animate explosion (a visual display to tweak the Ahmed haters)
bs - blink screen
cs - clear screen
pc - print a string of date/time info
pT - print current unix timestamp (2000 based, not 1970 based!)
pDb0 [LOC] -- print a byte from Arduino EEPROM
pDi0 [LOC] -- print an int from Arduino EEPROM
pDl0 [LOC] -- print a long from Arduino EEPROM
r - reset (sort of; needs work)
scd [YY:MM:DD] - set clock date
sct [HH:MM:ss] - set clock time
scw [DoW] - set day of week
sDb0 [LOC, VALUE] -- set a byte in Arduino EEPROM
sDi0 [LOC, VALUE] -- set an int in Arduino EEPROM
sDl0 [LOC, VALUE] -- set a long in Arduino EEPROM
sdm [1 or 0] - set display military (yes or no)
sds [1 or 0] - set display seconds (yes or no to show seconds or not)
si [intensity] - set display intensity
stm[message] - set temporary message -- shows a message briefly on the display
stt [milliseconds] - time to display temporary message
By the way: those interested in the little "suitcase" Ahmed Mohamed used for his clock reboxing, it's a Vaultz Personal Lockbox. You can get one on eBay for $16. Vaultz Locking Pencil Box 8.25 .5 .5 Inches Black (VZ01479) 1 Pack for sale online | eBay
His NASA teeshirt (for the full Halloween costume) could be this one:
http://www.ebay.com/itm/NASA-Vector-Logo-T-Shirt-Brand-New-Authentic-S-M-L-XL-2X-/161668973735?var=&hash=item25a438c4a7
gus_clock_151119.ino (84.4 KB)