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

Dependencies:   mbed

Revision:
0:0ed449e32cc1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jun 16 15:29:27 2013 +0000
@@ -0,0 +1,32 @@
+/*Program Example 12.3: function to initialise paired Bluetooth connection with RN-41 modules
+                                                                          */
+void initialise_connection() {
+
+  rn41.putc('$');    // Enter command mode
+  rn41.putc('$');    //
+  rn41.putc('$');    //
+  wait(0.5);
+
+  rn41.putc('C');    //
+  rn41.putc(',');    // Send MAC address
+  rn41.putc('0');    //
+  rn41.putc('0');    //
+  rn41.putc('0');    //
+  rn41.putc('6');    //
+  rn41.putc('6');    //
+  rn41.putc('6');    //
+  rn41.putc('0');    //
+  rn41.putc('7');    //
+  rn41.putc('A');    //
+  rn41.putc('C');    //
+  rn41.putc('C');    //
+  rn41.putc('1');    //
+  wait(0.5);
+
+  rn41.putc('-');    // Exit command mode
+  rn41.putc('-');    //
+  rn41.putc('-');    //
+  rn41.putc(0x0D);   //
+  wait(0.5);
+}
+