Enil Pajić Aida Pločo

Dependencies:   mbed

Fork of LV1_G1_Tim007_Zad2 by tim007 tim007

Revision:
1:febbb2498efa
Parent:
0:5fd44252399a
--- a/main.cpp	Mon Mar 03 07:37:49 2014 +0000
+++ b/main.cpp	Mon Mar 03 08:28:48 2014 +0000
@@ -4,33 +4,18 @@
  
 int main() {
     while(1) {
-        myled = 0;
-        wait(1);
-        myled = 1;
-        wait(1);
-        const double e = 0.9/30.0;
-        double f = 1 + e;               // 1.03
-        double h = 1 - e;               // 1 - 0.03
-        for (int a = 0; a < 30; ++a)
+        const double e = 1; //Ne radi kako treba :(
+        int f = 5 + e;       
+        int h = 5 - e;           
+        for (int a = 0; a < 5; ++a)
             {
-                myled = 0;              // Ukljucena
-                wait (f);               // za 1.03 pa 1.06, 1.09 ... pa 1.9
+                myled = 0;             
+                wait_ms (f);         
                 f += e;
-                myled = 1;              // Iskljucena
-                wait (h);               // za 0.97, pa 0.94 ... pa 0.1
+                myled = 1;         
+                wait_ms (h);       
                 h -= e;
             }
-        f = 1 - e;
-        h = 1 + e;
-        for (int a = 0; a < 60; ++a)
-            {
-                myled = 0;
-                wait (f);
-                f -= e;
-                myled = 1;
-                wait (h);
-                h += e;
- 
-            }
+
     }
 }
\ No newline at end of file