tim004 tim004 / Mbed 2 deprecated LV1_Grupa1_Tim004

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tim004
Date:
Mon Mar 03 07:33:44 2014 +0000
Commit message:
LV1 - PAI - Grupa1 - Tim004

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	Mon Mar 03 07:33:44 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+DigitalOut myled(LED2);
+
+int main() {
+    float turnOn=1.0, turnOff=1.0, koeficijent=0.06;
+    while(1) {
+        while(turnOn < 1.9)
+        {
+            myled = 0;
+            wait (turnOn);
+            myled = 1;
+            wait (turnOff);
+            turnOn += koeficijent;
+            turnOff -= koeficijent;
+        }
+        while(turnOn > 0.1)
+        {
+            myled = 0;
+            wait (turnOn);
+            myled = 1;
+            wait (turnOff);
+            turnOn -= koeficijent;
+            turnOff += koeficijent;
+        
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 03 07:33:44 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file