SPI,I2C,RTC

Dependencies:   MFRC522_Updated ssd1306_library

Revision:
0:fbda9e7e9269
Child:
1:fd4f40b923e7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 19 18:02:40 2020 +0000
@@ -0,0 +1,19 @@
+#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);
+    }
+}