Nuhodzic Muris Kusundzija Elma

Dependencies:   mbed

Revision:
0:4fca82498a9e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 13 14:04:59 2014 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+
+BusOut myled(dp23,dp24,dp25,dp26,dp27,dp5,dp6,dp28);
+DigitalOut enable(dp14);
+DigitalIn taster1(dp1);
+DigitalIn taster2(dp2);
+
+int main() {
+    enable=0;
+    int broj=0;
+    int ind=0;
+    while(1) {
+        ind=0;
+        while(taster1==1){
+            if(ind==0){
+            ind=1;
+            
+            myled=broj;
+            if(broj==255) broj=0;
+            else broj++;}
+            wait(0.5);
+        }
+        ind=0;
+        while( taster2==1){
+            if(ind==0){
+            ind=1;
+            
+            myled=broj;
+            if(broj==0) broj=255;
+            else broj--;} 
+            wait(0.5);
+         }  
+         }
+         }
\ No newline at end of file