Oled Alarm Clock
The OLED Alarm Clock is an Arduino Nano based project that displays the current time and a user-set alarm time on a 128×64 OLED display.
The project uses two push buttons. One button is used to increase the alarm hour, while the second button is used to increase the alarm minute and stop the buzzer when the alarm is ringing.
A buzzer produces an audible sound when the current time reaches the selected alarm time.
Supplies
Deshbot shield
nano
oled display
buzzer (inbuild )
buttons (inbuild)
Working Principle
The Arduino Nano maintains the current time using the millis() function.
Every 1000 milliseconds:
The current time is displayed on the OLED in:
The selected alarm time is displayed below it.
When the current time becomes equal to the alarm time, the Arduino activates the buzzer.
. Alarm Function
The Arduino continuously compares the current time with the alarm time.
The alarm is triggered when:
For example:
The alarm starts automatically.
The buzzer is connected to D11 and produces a 1000 Hz tone.
OLED Display
During normal operation, the OLED displays the current time:
When the alarm is triggered:
The buzzer continuously produces a 1000 Hz tone until D12 is pressed.
Downloads
Conclusion
The OLED Alarm Clock demonstrates how an Arduino Nano can be used to create a simple digital clock and alarm system.
The current time and alarm time are displayed on the OLED, while D10 and D12 provide simple control for setting the alarm. When the set time is reached, the buzzer sounds and can be stopped using D12.
This project combines Arduino programming, OLED I2C communication, button input, time management, and buzzer control into one practical embedded-system project.