Demo Clock with Nucleo-F303RE and Starter Shield

Dependencies:   DS1307 TM1636 mbed

Revision:
2:9e74d5f431ef
Parent:
1:dacca338a30b
diff -r dacca338a30b -r 9e74d5f431ef main.cpp
--- a/main.cpp	Thu May 18 08:31:33 2017 +0000
+++ b/main.cpp	Thu May 03 07:55:09 2018 +0000
@@ -44,7 +44,7 @@
          
         if (!button_K1)
         {
-            test_rw(my1307.settime( 00, 00, 12, 3, 17, 5, 17));
+            test_rw(my1307.settime( 00, 35, 12, 3, 17, 5, 17));
             pc.printf("time is set to 12:00:00 - 17.05.2017\n\r");
             
             junk = 0x39;                                                // just a junk value do read and write test to DS1307 ram
@@ -58,23 +58,23 @@
             
             temp[0] = hours / 10;
             temp[1] = hours % 10;
-            temp[2] = min / 10;
-            temp[3] = min % 10;             
+            temp[2] = sec / 10;
+            temp[3] = sec % 10;                   
             tm1636.display(temp);       
-    
+        
             //junk = 0;                                                   // clear junk to show that when the register is read from the correct value is obtained
             //test_rw(my1307.read( 0x20, &junk));                         // this should read register 0x20
             //pc.printf("Value read from register 0x20 %.2X \n\r",junk);
         }
-//       if ((sec % 2 == 1))
-//        {
-//            tm1636.point(true);
-//        }
-//        else
-//        {
-//            tm1636.point(false);
-//        }
+        if ((sec % 2 == 1))
+        {
+            //tm1636.point(POINT_ON);
+        }
+        else
+        {
+            //tm1636.point(POINT_OFF);
+        } 
         wait(1.0);
         myled = ! myled;
     }
-}
\ No newline at end of file
+}