Nedim Hozić

Dependencies:   mbed

Revision:
0:cb0b8e748def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 06 17:42:25 2014 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+
+DigitalOut myled(LED3);
+
+int main() {
+    
+    float suma1=1,suma2=1;
+    while(1) {
+        for(int i=0;i<15;i++){
+        myled = 1;
+        wait(suma2);
+        myled = 0;
+        wait(suma1);
+        suma1+=0.06;
+        suma2-=0.06;        
+        }
+        for(int i=0;i<30;i++){
+        myled = 1;
+        wait(suma2);
+        myled = 0;
+        wait(suma1);
+        suma1-=0.06;
+        suma2+=0.06;     
+           
+        }  
+        for(int i=0;i<15;i++){
+        myled = 1;
+        wait(suma2);
+        myled = 0;
+        wait(suma1);
+        suma1+=0.06;
+        suma2-=0.06;        
+        }  
+    }
+}