![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Alarm Clock
Fork of SmartRise_MBED by
Diff: main.cpp
- Revision:
- 11:be164273b969
- Parent:
- 8:edf5f23cb393
- Child:
- 12:f42b74f76630
--- a/main.cpp Tue Jan 26 23:13:48 2016 +0000 +++ b/main.cpp Wed Jan 27 02:03:43 2016 +0000 @@ -14,23 +14,26 @@ DigitalIn timeSW(p10); DigitalOut led2(LED2); - int main() { - time_init(); - off.rise(&turn_off); + time_init(); // Initializes clock and alarm times + off.rise(&turn_off); // Waits for signal from off switch on remote XBee + while(1) { - timeDisplay(); - if(checkAlarm())Sound_Alarm(); - - // Sound_Alarm(); + timeDisplay(); // Constantly Displays the Time + if(checkAlarm()) // Checks to see if it is time to sound the alarm and does so if apropriate + { + Sound_Alarm(); + } if(timeSW==1)timeProg(); if(AlarmAdjust==1) alarmProg(); led2 = 1; } } + + \ No newline at end of file