Whitworth-EN173-2016
/
SmartRise_MBED
Alarm Clock
Fork of SmartRise_MBED by
Diff: main.cpp
- Revision:
- 1:989eb818d3a3
- Parent:
- 0:dd224b695d95
- Child:
- 2:261fce57a100
--- a/main.cpp Thu Jan 21 19:50:59 2016 +0000 +++ b/main.cpp Sun Jan 24 01:53:04 2016 +0000 @@ -0,0 +1,20 @@ +//8.3 LCD control with MBED main. + +#include "mbed.h" +#include "LCD.h" +#include "TextLCD.h" + +TextLCD lcd(p27,p28,p23,p24,p25,p26); + +int main() { + + while(1) { + time_t seconds = time(NULL); + + char buffer[32]; + strftime(buffer, 32, "%a%m/%d %I:%M%p \n", localtime(&seconds)); //day, #month/#day Hr:min (AP)M + lcd.printf("%s", buffer); + + wait(1); + } +} \ No newline at end of file