Hier könnte funktionieren

Dependencies:   C12832 mbed

Files at this revision

API Documentation at this revision

Comitter:
PinguPanda
Date:
Fri Jan 15 11:59:57 2016 +0000
Commit message:
Hier Garantier nichts

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
diff -r 000000000000 -r 0bec2b815282 C12832.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Fri Jan 15 11:59:57 2016 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r 0bec2b815282 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 15 11:59:57 2016 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+
+Ticker Tick;
+
+Serial pc(USBTX, USBRX);
+
+C12832 lcd(p5, p7, p6, p8, p11);
+
+int msek;
+int sek;
+int min;
+int stund;
+int wert;
+int nr;
+bool state;//true =countdownmode //false == inputmode
+
+void zaehl()
+{
+    if(state)
+    {
+        wert--;
+        msek=wert % 1000;
+        nr=wert-msek;
+        sek=nr % 60;
+        nr=nr-sek;
+        min=nr %60;
+        nr=nr-min;
+        stund=nr %24;
+    } 
+}
+
+int main() {
+    Tick.attach(&zaehl, 0.001);
+    while(1) {
+        if(!state)
+        {
+            pc.printf("Setze deinen Countdown Wert in Millisekunden");    
+            pc.scanf("%i", &wert);
+        }
+    }
+}
diff -r 000000000000 -r 0bec2b815282 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 15 11:59:57 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file