Alarm Clock

Dependencies:   TextLCD mbed

Fork of SmartRise_MBED by Austin Sloop

Committer:
pstephens18
Date:
Tue Jan 26 01:49:16 2016 +0000
Revision:
8:edf5f23cb393
Parent:
7:5412a6d7ef6d
Child:
11:be164273b969
Off switch working with alarm. All parts together.

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);
pstephens18 8:edf5f23cb393 15 DigitalOut led2(LED2);
asloop18 3:51b248042aa0 16
asloop18 1:989eb818d3a3 17
pstephens18 5:90f059fdc625 18 int main()
pstephens18 5:90f059fdc625 19 {
asloop18 4:33f3750fe70a 20 time_init();
pstephens18 5:90f059fdc625 21 off.rise(&turn_off);
pstephens18 8:edf5f23cb393 22 while(1)
pstephens18 8:edf5f23cb393 23 {
asloop18 6:73866b51e0b7 24 timeDisplay();
asloop18 7:5412a6d7ef6d 25 if(checkAlarm())Sound_Alarm();
pstephens18 8:edf5f23cb393 26
pstephens18 8:edf5f23cb393 27 // Sound_Alarm();
pstephens18 8:edf5f23cb393 28
asloop18 6:73866b51e0b7 29 if(timeSW==1)timeProg();
asloop18 6:73866b51e0b7 30 if(AlarmAdjust==1) alarmProg();
pstephens18 8:edf5f23cb393 31 led2 = 1;
asloop18 6:73866b51e0b7 32 }
asloop18 4:33f3750fe70a 33 }
asloop18 4:33f3750fe70a 34
asloop18 4:33f3750fe70a 35
asloop18 7:5412a6d7ef6d 36