Library for using the xbee-compatible Bluetooth Bee Module on an m3pi.

Dependencies:   SensoryTest

Fork of btbee by Nikolas Goldin

Revision:
4:3cdbefbd2409
Parent:
3:ddeb620fb25e
--- a/btbee.cpp	Wed Feb 05 10:32:04 2014 +0000
+++ b/btbee.cpp	Wed Feb 05 11:18:48 2014 +0000
@@ -60,12 +60,12 @@
 int pos=0;
 do 
 {
-    while(!readable()){}
-    if (pos==len){return 0;}
+    while(!readable()){} //wait until readable
+    if (pos==len){return 0;} 
     arr[pos]=getc(); 
     pos++;
     *chars_read = pos;
 }
-while (!(arr[pos]=='\n'));
+while (!(arr[pos-1]=='\n'));
 return 1;
 }