Digital Alarm Clock based on Arduino MEGA board
I’ve used 2 standard breadboards for building a prototype. This project doesn’t need a lot of external components, even the pull up resistors for push buttons are internal in the ATmega2560 chip. Later you can transfer the parts to a strip board.
In order to set the time you’ll need to press Time Set and Hours or Minutes buttons at the same time. The same principle is true for setting the Alarm. Press Alarm Set and Hours or Minutes buttons together. You can see how it works in the short video next. The Alarm is working at the last few seconds of the video.
Few ideas for improving this design. Currently setting the Time/Alarm will introduce a small error to 1 second delay changing the Clock timing. Probably the correct way to do it is to use Timers that run in background and are not influenced by the main program. I’m working on improving my Arduino programming skills, so maybe I’ll revisit this design later. Meanwhile feel free to experiment with this code/project.