Armando Hernández / Mbed 2 deprecated DS1302_HelloWorld

Dependencies:   mbed DS1302

Revision:
2:10b51af4fb8c
Parent:
1:e747c4ea86e0
Child:
3:8c4b9d2adf7a
--- a/main.cpp	Sat Feb 21 15:18:52 2015 +0000
+++ b/main.cpp	Fri Nov 30 03:12:40 2018 +0000
@@ -1,6 +1,6 @@
-#define SCLK    PTC5
-#define IO      PTC4
-#define CE      PTC3
+#define SCLK   p22
+#define IO     p23
+#define CE     p24
 
 //Comment this line if the DS1302 is already running
 #define INITIAL_RUN
@@ -12,16 +12,16 @@
 
 int main() {
     #ifdef INITIAL_RUN
-    clk.set_time(1256729737);
+    clk.set_time(2056729737);
     #endif
     
     char storedByte = clk.recallByte(0);
-    printf("\r\nStored byte was %d, now increasing by one\r\n", storedByte);
+    //printf("\r\nStored byte was %d, now increasing by one\r\n", storedByte);
     clk.storeByte(0, storedByte + 1);
     
     while(1) {
         time_t seconds = clk.time(NULL);
-        printf("Time as a basic string = %s\r", ctime(&seconds));
+        printf("Fecha - Hora = %s\r", ctime(&seconds));
         wait(1);
     }
 }