probando el micro

Dependencies:   mbed

Revision:
0:ea5cf5fc3581
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 09 14:07:27 2019 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+DigitalOut rojo(LED1);
+DigitalOut verde(LED2);
+Ticker charo;
+void mav(){
+    static int i = 0, vez = 0;
+    rojo = 1;
+    verde = 1;
+    i++;
+    if(i == 9){
+        rojo = 0;
+        i = 0;
+        vez++;
+    }
+    
+    if((i == 2) && (vez == 5)){
+        verde = 0;
+        i = 0;
+        vez = 0;
+    }
+    
+}
+int main() {
+    charo.attach(&mav, 0.1);
+    while(1) {
+    }
+}