upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the HM-11 4.0 Bluetooth Low Energy Module. More...
The driver was tested with the Grove BLE module. It's an HM-11 BLE 4.0 module based on a TI CC2541 chip. It operates using a standard 'AT' command set. See the datasheet for a full list of available commands and their possible responses:
http://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf
It is connected via a UART at 9,600 baud.
Public Member Functions | |
synchronized void | delete () |
HM11 (int uart) | |
boolean | dataAvailable (long millis) |
int | readData (byte[] buffer) |
int | writeData (byte[] buffer) |
boolean | setupTty (int baud) |
boolean | setupTty () |
boolean dataAvailable | ( | long | millis | ) |
Checks to see if there is data available for reading
millis | Number of milliseconds to wait; 0 means no waiting |
boolean setupTty | ( | int | baud | ) |
Sets up proper tty I/O modes and the baud rate. For this device, the default baud rate is 9,600 (B9600).
baud | Desired baud rate. |