Nuhodzic Muris Kusundzija Elma

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tim010
Date:
Thu Mar 13 14:04:59 2014 +0000
Commit message:
LV2_Grupa5_Tim010_Zadatak2

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 4fca82498a9e main.cpp
--- /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
diff -r 000000000000 -r 4fca82498a9e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 13 14:04:59 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file