tim007 tim007 / Mbed 2 deprecated LV1_Grupa6_Tim007_Zadatak5

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tim007
Date:
Thu Mar 06 16:43:54 2014 +0000
Commit message:
LV1-PAI-Grupa6-Tim007

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 06 16:43:54 2014 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+int main()
+{
+    bool zamjena(true);
+    float c1(0.005);
+    float c2(0.005);
+    while(1)
+    {
+        if(zamjena)
+        {
+            myled = 0;
+            wait(c1);
+            c1=c1+0.0000245;
+            myled = 1;
+            wait(c2);
+            c2=c2-0.0000245;
+            if(c1>=0.0099245)
+            {
+                zamjena=false;
+                c1=0.0099;
+                c2=0.0001;
+            }
+        }
+           else
+        {
+            myled = 0;
+            wait(c1);
+            c1=c1-0.0000245;
+            myled = 1;
+            wait(c2);
+            c2=c2+0.0000245;
+            if(c2>=0.0099245)
+            {
+                zamjena=true;
+                c2=0.0099;
+                c1=0.0001;
+            }
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 06 16:43:54 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file