Alarm Clock

Dependencies:   TextLCD mbed

Fork of SmartRise_MBED by Austin Sloop

main.cpp

Committer:
asloop18
Date:
2016-01-24
Revision:
1:989eb818d3a3
Parent:
0:dd224b695d95
Child:
2:261fce57a100

File content as of revision 1:989eb818d3a3:

//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);
    }
}