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 RedBearLab

Files at this revision

API Documentation at this revision

Comitter:
jemiaha
Date:
Tue Sep 08 18:28:50 2015 +0000
Parent:
3:2b4b55b7f467
Commit message:
Publishing slightly modified sample code. I added the temperature and battery services.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2b4b55b7f467 -r 4b070c445de4 main.cpp
--- 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);