Alarm Clock

Dependencies:   TextLCD mbed

Fork of SmartRise_MBED by Austin Sloop

Committer:
asloop18
Date:
Tue Jan 26 01:22:36 2016 +0000
Revision:
7:5412a6d7ef6d
Parent:
5:90f059fdc625
Parent:
6:73866b51e0b7
Child:
8:edf5f23cb393
functions compiled;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asloop18 1:989eb818d3a3 1 //8.3 LCD control with MBED main.
asloop18 1:989eb818d3a3 2
asloop18 1:989eb818d3a3 3 #include "mbed.h"
asloop18 1:989eb818d3a3 4 #include "TextLCD.h"
asloop18 4:33f3750fe70a 5 #include "TimeControl.h"
pstephens18 5:90f059fdc625 6 #include "Alarm.h"
asloop18 4:33f3750fe70a 7 #include <time.h>
asloop18 4:33f3750fe70a 8
asloop18 4:33f3750fe70a 9 Serial pc(USBTX,USBRX);
asloop18 1:989eb818d3a3 10
asloop18 3:51b248042aa0 11 DigitalIn AlarmAdjust(p9);
pstephens18 5:90f059fdc625 12 InterruptIn off(p15);
asloop18 3:51b248042aa0 13
asloop18 7:5412a6d7ef6d 14 DigitalIn timeSW(p10);
asloop18 3:51b248042aa0 15
asloop18 1:989eb818d3a3 16
pstephens18 5:90f059fdc625 17 int main()
pstephens18 5:90f059fdc625 18 {
asloop18 4:33f3750fe70a 19 time_init();
pstephens18 5:90f059fdc625 20 off.rise(&turn_off);
asloop18 6:73866b51e0b7 21 while(1){
asloop18 6:73866b51e0b7 22 timeDisplay();
asloop18 7:5412a6d7ef6d 23 if(checkAlarm())Sound_Alarm();
asloop18 6:73866b51e0b7 24 if(timeSW==1)timeProg();
asloop18 6:73866b51e0b7 25 if(AlarmAdjust==1) alarmProg();
asloop18 7:5412a6d7ef6d 26
asloop18 6:73866b51e0b7 27 }
asloop18 4:33f3750fe70a 28 }
asloop18 4:33f3750fe70a 29
asloop18 4:33f3750fe70a 30
asloop18 7:5412a6d7ef6d 31