SPI,I2C,RTC
Dependencies: MFRC522_Updated ssd1306_library
Diff: main.cpp
- Revision:
- 6:820dac5cdd1e
- Parent:
- 5:e86f65d4cdf2
- Child:
- 7:6372f34c11d1
diff -r e86f65d4cdf2 -r 820dac5cdd1e main.cpp --- a/main.cpp Wed May 20 01:28:53 2020 +0000 +++ b/main.cpp Wed May 20 01:36:08 2020 +0000 @@ -1,5 +1,3 @@ -#include "mbed.h" -#include "stdio.h" #include "string.h" #include "ssd1306.h" SSD1306 lcd (D7, D6); @@ -14,9 +12,7 @@ { t.attach(&conteo,1); q=1589916065; - - while (true) { - lcd.init(); + lcd.init(); lcd.speed (SSD1306::Medium); lcd.cls(); lcd.locate (3,1); @@ -28,14 +24,16 @@ lcd.redraw(); wait(3); lcd.redraw(); + + while (true) { + + lcd.redraw(); set_time(q); time_t seconds = time(NULL); - pc.printf(" %u\n\r ", (unsigned int)seconds); - pc.printf("fecha %s\n\r", ctime(&seconds)); wait(1); } -} +} \ No newline at end of file