HelloWorld Blinky Program

Dependencies:   mbed

Fork of LPCX824_blinky_v1 by Steven Cheldelin

Files at this revision

API Documentation at this revision

Comitter:
rcflyair
Date:
Sun Dec 07 07:13:55 2014 +0000
Commit message:
Just got this board and couldn't find any sample code for it! Here's a simple helloworld blinky.

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 ff88e3980956 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Dec 07 07:13:55 2014 +0000
@@ -0,0 +1,30 @@
+#include "mbed.h"
+
+// LPCXpresso 824-MAX
+// Blinky hello world program will light red, green, blue led in sequence
+
+DigitalOut r(P0_12);
+DigitalOut g(P0_16);
+DigitalOut b(P0_27);
+
+int main(void)
+{
+    // turn off all led's
+    r = 1; g = 1; b = 1;
+    
+    while(1)
+    {
+        r = 0;
+        wait_ms(250);
+        r = 1;
+        wait_ms(250);
+        g = 0;
+        wait_ms(250);
+        g = 1;
+        wait_ms(250);
+        b = 0;
+        wait_ms(250);
+        b = 1;
+        wait_ms(250);    
+    }
+}
diff -r 000000000000 -r ff88e3980956 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Dec 07 07:13:55 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file