|
ECRobot C++ API for LEGO MINDSTORMS NXT
1.0.10
|
Bluetooth connection helper class. More...
#include <BTConnection.h>
Public Member Functions | |
| BTConnection (Bluetooth &bt, Lcd &lcd, Nxt &nxt) | |
| Constructor. | |
| SINT | connect (const CHAR *passkey, const CHAR *devname=0) |
| Establish Bluetooth connection as a slave device and display the status in the LCD. | |
| SINT | connect (const CHAR *passkey, const U8 address[7]) |
| Establish Bluetooth connection as a master device and display the status in the LCD. | |
Bluetooth connection helper class.
| ecrobot::BTConnection::BTConnection | ( | Bluetooth & | bt, |
| Lcd & | lcd, | ||
| Nxt & | nxt | ||
| ) | [inline] |
Constructor.
| bt | Reference of a Bluetooth object. |
| lcd | Reference of a LCD object. |
| nxt | Reference of a NXT object. |
| SINT ecrobot::BTConnection::connect | ( | const CHAR * | passkey, |
| const CHAR * | devname = 0 |
||
| ) |
Establish Bluetooth connection as a slave device and display the status in the LCD.
Note that the connection process can be canceled by keep pushing ENTR button on the NXT for longer than 0.5sec.
| passkey | Bluetooth passkey (up to 16 characters. I.e. "1234") |
| devname | Bluetooth user freindly device name (optional parameter. e.g. "NXT") |
| SINT ecrobot::BTConnection::connect | ( | const CHAR * | passkey, |
| const U8 | address[7] | ||
| ) |
Establish Bluetooth connection as a master device and display the status in the LCD.
Note that the connection process can be canceled by keep pushing ENTR button on the NXT for longer than 0.5sec.
| passkey | Bluetooth passkey (up to 16 characters. I.e. "1234") |
| address | Bluetooth Device Address to be connected (7bytes hex array data) |