SPI,I2C,RTC
Dependencies: MFRC522_Updated ssd1306_library
main.cpp
- Committer:
- 20172573073
- Date:
- 2020-05-19
- Revision:
- 0:fbda9e7e9269
- Child:
- 1:fd4f40b923e7
File content as of revision 0:fbda9e7e9269:
#include "mbed.h" int main() { set_time(1589850133); while (true) { time_t seconds = time(NULL); printf(" %u\n\r ", (unsigned int)seconds); printf("fecha %s\n\r", ctime(&seconds)); char buffer[32]; strftime(buffer, 32, "%I:%M %p\n\r", localtime(&seconds)); printf("Time as a custom formatted string = %s\n\r", buffer); wait(1); } }