XD

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
SantiagoE
Date:
Fri May 01 19:43:50 2020 +0000
Commit message:
Mbed Ejemplo

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 00f775075856 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 01 19:43:50 2020 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalOut myled(LED_GREEN);
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    int i = 0;
+    pc.baud(9600);
+    pc.printf("Hello World!\n");
+
+    while (true) {
+        wait(0.5f); // wait a small period of time
+        pc.printf("%d \n", i); // print the value of variable i
+        i++; // increment the variable
+        myled = !myled; // toggle a led
+    }
+}
diff -r 000000000000 -r 00f775075856 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 01 19:43:50 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file