OKOK

Dependencies:   C12832 mbed

Files at this revision

API Documentation at this revision

Comitter:
chifterben94
Date:
Mon Feb 06 14:14:51 2017 +0000
Commit message:
OKOK; ;

Changed in this revision

C12832.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Mon Feb 06 14:14:51 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/askksa12543/code/C12832/#990d5eec2ef6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 06 14:14:51 2017 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+#include "C12832.h"
+
+C12832 ecran(PA_7,PA_5,PA_6,PA_8,PB_6); // nom a changer
+Ticker t1; // nom a changer
+int hour = 23;
+int min = 58;
+int sec = 50;
+
+void ecoulementDuTemps(){ // nom a changer
+       
+    sec ++;
+}
+
+int main() {
+    
+    t1.attach(&ecoulementDuTemps,1); //  2 nom a changer t1 et ecoulementDuTemps
+    
+    while(1) {
+        
+        if (sec >= 60)
+        {
+            sec = 0;
+            min ++;
+        }
+        if (min >= 60)
+        {
+            min = 0;
+            hour ++;
+        }
+        if (hour >= 24)
+        {     
+            hour = 0;
+        }
+        
+        ecran.cls();//nom ecran a changer
+        ecran.locate(0,0);//nom ecran a changer
+        ecran.printf("%d :  %d :  %d",hour,min,sec); // nom ecran a changer
+        wait_ms(200); // a modifier un peu ne pas depasser 1s
+        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 06 14:14:51 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d
\ No newline at end of file