Pejovic Luka Durakovic Adna

Dependencies:   mbed

Revision:
0:b846b55b0996
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 10 17:39:21 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+BusOut ledice(dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28);
+
+DigitalOut enable(dp14);
+DigitalIn taster(dp1);
+
+int main() {
+    
+    int broj = 0;
+    enable = 0;
+    ledice = broj;
+    
+    while(1) {
+        if(taster == 0) broj++;
+        else broj--;
+        
+        if(broj < 0) broj = 255;
+        if(broj > 255) broj = 0;
+        
+        ledice =  broj;
+        wait(1);
+    }
+}