Chris Styles
/
RN42-HelloWorld
Hello World program, looping back serial data over RN42 bluetooth
Revision 0:c1134839fe1a, committed 2011-03-31
- Comitter:
- chris
- Date:
- Thu Mar 31 12:55:00 2011 +0000
- Commit message:
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 Thu Mar 31 12:55:00 2011 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial rn42(p9,p10); +DigitalOut myled(LED1); + +int main() { + + rn42.baud(115200); + + // echo back characters, toggle the LED + while (1) { + if (rn42.readable()) { + rn42.putc(rn42.getc()); + myled = !myled; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 31 12:55:00 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912