This is a simple program to work with RedBearLab BLE Controller App. Type something from the Terminal to send to the BLEController App or vice verse. Characteristics received from App will print on Terminal.
Dependencies: BLE_API mbed nRF51822
Fork of nRF51822_SimpleChat by
Diff: main.cpp
- Revision:
- 4:4b070c445de4
- Parent:
- 3:2b4b55b7f467
--- a/main.cpp Wed Sep 02 14:09:36 2015 +0000 +++ b/main.cpp Tue Sep 08 18:28:50 2015 +0000 @@ -69,6 +69,7 @@ // TODO add custom service instead of Heart rate GattService temperatureService(GattService::UUID_HEART_RATE_SERVICE, temperatureChars, sizeof(temperatureChars) / sizeof(GattCharacteristic *)); + static uint8_t batteryLevel = 0xAA; GattCharacteristic batteryPercentage(GattCharacteristic::UUID_BATTERY_LEVEL_CHAR, (uint8_t *)batteryLevel, sizeof(batteryLevel), sizeof(batteryLevel), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);