el 2 para el hercules

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Franmaver
Date:
Tue Apr 09 14:05:23 2019 +0000
Commit message:
el 2 pero para el hercules

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:05:23 2019 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+//Hacer parpadear un led verde cada 0.25s con ticker y hercules
+
+DigitalOut myled(LED2);
+Ticker charin;
+void mav();
+
+int main() {
+    
+    charin.attach(&mav, 0.25);
+    
+    while(1) {
+        }
+}
+void mav () {
+    static int i = 0;
+    myled = !myled;
+    i++;
+    
+    if (i == 4)
+    {
+        printf ("maver gay\n");
+        i = 0;
+    }
+    
+    }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Apr 09 14:05:23 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file