Demo Glucose Service
Dependencies: BLE_API mbed nRF51822
Fork of BLE_HeartRate by
BLE_Glucose_demo implements the Glucose Service which enables a collector device to connect and interact with.
There is a brief sample code edited with Android Studio for demo this BLE_Glucose_demo example, and it is public on github, everyone can clone it by this URL: https://github.com/Marcomissyou/BluetoothLeGlucose.git. It is convenient for you to development your BLE idea.
There is also provided apk file so you can download and install it directly then demo this code, but make sure your Android phone supports Bluetooth 4.0. /media/uploads/Marcomissyou/bleglucoseservice.apk
Diff: main.cpp
- Revision:
- 13:3ca2045597e7
- Parent:
- 11:1d9aafee4984
- Child:
- 15:7ba28817e31e
--- a/main.cpp Tue Jun 10 14:22:01 2014 +0100 +++ b/main.cpp Tue Jun 10 14:36:25 2014 +0100 @@ -103,6 +103,10 @@ } } +/** + * Runs once a second in interrupt context triggered by the 'ticker'; updates + * battery level and hrmCounter if there is a connection. + */ void periodicCallback(void) { led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */ @@ -128,11 +132,6 @@ } } -/**************************************************************************/ -/*! - @brief Program entry point -*/ -/**************************************************************************/ int main(void) { led1 = 1; @@ -146,7 +145,6 @@ ble.onUpdatesEnabled(updatesEnabledCallback); ble.onUpdatesDisabled(updatesDisabledCallback); - /* Initialise the nRF51822 */ DEBUG("Initialising the nRF51822\n\r"); ble.init();