IPN ESIME ZACATENCO / Mbed 2 deprecated FRDM46Z_Time_Out

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
rcortes
Date:
Mon Mar 24 19:21:59 2014 +0000
Commit message:
Blink until Timeout

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
diff -r 000000000000 -r 5ef02a7b3cde main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 24 19:21:59 2014 +0000
@@ -0,0 +1,29 @@
+//Blink until Timeout
+#include "mbed.h"
+#define ENC 0
+#define APG 1
+Timeout tiempofuera;
+
+DigitalOut rojo(LED_RED);
+DigitalOut verde(LED_GREEN);
+
+int encendido=1;
+
+void hasta_tiempo()
+{
+    encendido=0;
+}
+
+int main()
+{
+    tiempofuera.attach(&hasta_tiempo,5);
+    rojo=APG;
+    while(encendido) {
+        verde=!verde;
+        wait(0.2);
+    }
+    while(true) {
+        rojo=ENC;
+        verde=APG;
+    }
+}
diff -r 000000000000 -r 5ef02a7b3cde mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 24 19:21:59 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file