a simple uart (printf) test program

Dependencies:   mbed

Revision:
0:48b5be00cf5e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jun 17 06:37:37 2018 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalOut myled(LED2);
+
+// for LPCXpresso LPC1114 board
+// UART TX: xp9, dp16
+// UART RX: xp10, dp15
+// *************************************
+// ** serial port: 9600, 8, N, 1, N
+// *************************************
+//Serial pc(xp9, xp10);
+
+int main() {
+    //pc.printf("LPC1114 demo \r\n");
+
+    while(1) {
+        myled = 1;
+        printf("led on\n\r");
+        for (int i=0; i<1000000; i++);
+        //wait(1);
+        myled = 0;
+        printf("led off\n\r");
+        for (int i=0; i<1000000; i++);
+        //wait(1);
+    }
+}