test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Sim
Date:
Fri Mar 22 18:12:07 2019 +0000
Commit message:
old library

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	Fri Mar 22 18:12:07 2019 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalOut myled(LED_GREEN);
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+    int i = 0;
+    pc.baud(115200);
+    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
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Mar 22 18:12:07 2019 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file