A small change to the code and adding a few components: Here’s “the Alarm Clock“.
Compared to the previous project, I added a buzzer Piezzo, a diode LED, a resistor of 220 ohms, a button and as said before, I listened to the suggestion of “ArduPic” and I removed the resistance to “pull down.”
To remove the “pull down” resistances I had to make a change to the code.
Use the pullup resistors of arduino, and reverse the code logic conditions.
The activation and deactivation of the alarm clock is controlled by the “P4” button, line 444 “void Alarm()”.
To enter the alarm settings, you must use the “P3” “P2” buttons together, line 81 “if((digitalRead(P2)== LOW)&&(digitalRead(P3)== LOW))”.
When the alarm is not set, the bottom of the display will show “Alarm Off” when the alarm is active, it shows the time that has been set.
At the scheduled time, the display flashes, the LED lights up, and the buzzer sounds two tones.
To turn off the alarm, you have to act on the P4 button, or, after a minute, it turns off alone
I am attaching the electric schematic and the layout Fritzing
Read More: Alarm Clock
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days