Lejla Agić Pajić Enil

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tim008
Date:
Mon Mar 10 08:11:05 2014 +0000
Commit message:
LV2-G1-Tim008-Z2

Changed in this revision

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 87b90179fb7d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 10 08:11:05 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+BusOut l (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28);
+DigitalOut e (dp14);
+DigitalIn t1 (dp1);
+DigitalIn t2 (dp2);
+
+int main() {
+    e = 0;
+    int x = 0;
+    bool p = false;
+    l = x;
+    while(1) {
+        l = (x + 1) % 256;
+        wait (0.15);
+        if (!p)
+         {
+            p = true;
+            if (t1 == 1) x++; 
+            else if (t2 == 1) x--;
+        }
+        if (t1 == 0 && t2 == 0) p = false;
+    }
+}
diff -r 000000000000 -r 87b90179fb7d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 10 08:11:05 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file