Alarm Clock © CC BY-NC-SA

Alarm Clock with Arduino.

  • 26,549 views
  • 41 comments
  • 26 respects

Components and supplies

About this project

After designing the "Clock Set Date Time" and hearing the suggestion of ArduPic, I thought it would be a good idea and also useful, add a "wake-up alarm." 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."

Arduino Code

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.

pinMode(P1,INPUT_PULLUP);
pinMode(P2,INPUT_PULLUP);
pinMode(P3,INPUT_PULLUP);
pinMode(P4,INPUT_PULLUP);
if(digitalRead(P1)==LOW)
{
menu=menu+1;

Alarm Code

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.

Code

Alarm Clock

Schematics

electric schematic
Alarm clock 5kz82y7hnm
Fritzing Scheme Jpg
Allarm clock bb cfgmnpj5c9
Fritzing scheme
alarm_clock_cctp6USVTx.fzz
Fritzing Scheme link

Comments

Similar projects you might like

Arduino Oscilloscope (6-channel)

by Meeker6751

  • 1,495 views
  • 5 comments
  • 12 respects

Turn Lights On When Approaching Home

Project tutorial by Andrei Florian

  • 1,381 views
  • 3 comments
  • 8 respects

Gesture Control Robot

Project tutorial by Raunak Oberai

  • 1,736 views
  • 6 comments
  • 9 respects

Matrix Orbital GTT TFT Thermometer Stage 1

Project tutorial by MatrixOrbital

  • 3,853 views
  • 0 comments
  • 11 respects

Air Quality Monitoring

Project tutorial by Ruchir Sharma

  • 312 views
  • 0 comments
  • 4 respects

Temperature and Humidity Sensor

by Amarantowy

  • 270 views
  • 1 comment
  • 2 respects
Add projectSign up / Login