probando el micro

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Franmaver
Date:
Tue Apr 09 14:07:27 2019 +0000
Commit message:
el 4. de lo mismo tambien

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	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) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 09 14:07:27 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file