Bluetooth mérés program
Fork of RN42-HelloWorld by
Diff: main.cpp
- Revision:
- 0:c1134839fe1a
- Child:
- 1:581f6547e8aa
diff -r 000000000000 -r c1134839fe1a main.cpp --- /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; + } + } +}