![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Alarm Clock
Fork of SmartRise_MBED by
Diff: main.cpp
- Revision:
- 4:33f3750fe70a
- Parent:
- 3:51b248042aa0
- Child:
- 5:90f059fdc625
- Child:
- 6:73866b51e0b7
diff -r 51b248042aa0 -r 33f3750fe70a main.cpp --- a/main.cpp Mon Jan 25 21:08:47 2016 +0000 +++ b/main.cpp Tue Jan 26 00:47:00 2016 +0000 @@ -2,24 +2,31 @@ #include "mbed.h" #include "TextLCD.h" -#include "TimeControl.cpp" +#include "TimeControl.h" +#include <time.h> + +Serial pc(USBTX,USBRX); TextLCD lcd(p27,p28,p23,p24,p25,p26); //RS E d1,d2,d3,d4 DigitalIn HrAdjustUp(p6); DigitalIn HrAdjustDown(p7); DigitalIn MinAdjust(p8); //buttons for setting time and alarm DigitalIn AlarmAdjust(p9); -Timer set; -Serial pc(USBTX,USBRX); InterruptIn safetyOff(p5); int main() { - int Ahr,Amin; - Ahr=11;Amin=30; - set.start(); + time_init(); +} + + + + + + +/* while(1) { time_t seconds = time(NULL); @@ -40,7 +47,6 @@ // if( Ahr=___&&Amin=((localtime(&secods)%3600)/60 ){ - +*/ - } -} \ No newline at end of file +