Ahmed Đuherić Elma Kušundžija

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tim003
Date:
Thu Mar 06 13:50:07 2014 +0000
Parent:
0:d4312b2977c5
Commit message:
LV1 - PAI - Grupa5 - Tim003

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d4312b2977c5 -r 53c0a6d9ca4c main.cpp
--- a/main.cpp	Thu Mar 06 13:21:47 2014 +0000
+++ b/main.cpp	Thu Mar 06 13:50:07 2014 +0000
@@ -1,12 +1,35 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut myled(LED2);
 
 int main() {
+     int i=0;
+        float x=0.06;
     while(1) {
+        
+       
+        for(i=0;i<15;i++)
+        {
+            
+        myled = 0;
+        wait(x*i+1);
         myled = 1;
-        wait(1);
+        wait(1-x*i);
+        }
+        for(i=0;i<30;i++)
+        {
+            
         myled = 0;
-        wait(1);
+        wait(1.9-x*i);
+        myled = 1;
+        wait(0.1+x*i);
+        }
+        for(i=0;i<15;i++)
+        {
+            myled = 0;
+        wait(x*i+0.1);
+        myled = 1;
+        wait(1.9-x*i);
+            }
     }
 }