by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"

Dependencies:   mbed

Revision:
0:49c6be914a81
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jun 16 15:28:28 2013 +0000
@@ -0,0 +1,17 @@
+/* Program Example 12.1: Bluetooth serial test data program
+                                                                  */
+#include "mbed.h"
+Serial rn41(p9,p10);
+BusOut led(LED4,LED3,LED2,LED1);
+
+int main() {
+  rn41.baud(115200);     // set baud for RN41
+  while (1) {
+    for (char x=0x30;x<=0x39;x++){  // ASCII numerical characters 0-9
+      rn41.putc(x);                 // send test char data on serial
+      led = x & 0x0F;               // set LEDs to count in binary
+      wait(0.5);
+    }
+  }
+}
+