SPI,I2C,RTC
Dependencies: MFRC522_Updated ssd1306_library
main.cpp
- Committer:
- 20172573073
- Date:
- 2020-05-20
- Revision:
- 5:e86f65d4cdf2
- Parent:
- 4:500f1ba2d17a
- Child:
- 6:820dac5cdd1e
File content as of revision 5:e86f65d4cdf2:
#include "mbed.h" #include "stdio.h" #include "string.h" #include "ssd1306.h" SSD1306 lcd (D7, D6); Serial pc(USBTX, USBRX); Ticker t; int q=0; void conteo() { q=q+1; } int main() { t.attach(&conteo,1); q=1589916065; while (true) { lcd.init(); lcd.speed (SSD1306::Medium); lcd.cls(); lcd.locate (3,1); lcd.printf ("Escaner RF"); lcd.locate (4,1); lcd.printf ("Andres Arevalo"); lcd.locate (5,1); lcd.printf ("Andres castano"); lcd.redraw(); wait(3); 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); } }