creo que es otro ticker

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Franmaver
Date:
Tue Apr 09 14:06:52 2019 +0000
Commit message:
ya no me acuerdo cual es este. creo que sigue siendo ticker

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:06:52 2019 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+//Hacer la siguiente secuencia Rojo 0.1ON, 0.9OFF
+
+DigitalOut myled(LED1);
+
+Ticker maver;
+
+void charin (){
+    static int i = 0;
+    myled = 1;
+    i++;
+    if(i == 9){
+        myled = 0;
+        i = 0;
+        }     
+        
+    }
+
+int main() {
+    
+    maver.attach (&charin, 0.1);
+    
+    while(1) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 09 14:06:52 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file