a simply blinky test program

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
poushen
Date:
Sun Jun 17 06:17:47 2018 +0000
Commit message:
a simple led blinky program

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 ba3b9b884e1b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jun 17 06:17:47 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);
+    }
+}
diff -r 000000000000 -r ba3b9b884e1b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jun 17 06:17:47 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file