BLE demo for the Health-Thermometer service.

Dependencies:   BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1

This example demonstrates how to use the Health Thermometer Service. The Health Thermometer service reports two pieces of information, Temperature and Sensor Location.

API

Import library

Public Types

enum SensorLocation_t {
LOCATION_ARMPIT = 1, LOCATION_BODY , LOCATION_EAR , LOCATION_FINGER ,
LOCATION_GI_TRACT , LOCATION_MOUTH , LOCATION_RECTUM , LOCATION_TOE ,
LOCATION_EAR_DRUM
}

Public Member Functions

HealthThermometerService ( BLE &_ble, float initialTemp, uint8_t _location)
Add the Health Thermometer Service to an existing BLE object, initialize with temperature and location.
void updateTemperature (float temperature)
Update the temperature being broadcast.
void updateLocation ( SensorLocation_t loc)
Update the location.

Technical Details

Further Technical Details can be found at the following links

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Tue Sep 29 12:10:38 2015 +0000
Parent:
13:30f6f65629b5
Child:
15:57860d1cd14d
Commit message:
updating underlying libraries.

Changed in this revision

BLE_API.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
nRF51822.lib Show annotated file Show diff for this revision Revisions of this file
--- a/BLE_API.lib	Sat Jun 20 23:46:17 2015 +0000
+++ b/BLE_API.lib	Tue Sep 29 12:10:38 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#9f4251b3355c
+http://mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/#d494ad3e87bd
--- a/main.cpp	Sat Jun 20 23:46:17 2015 +0000
+++ b/main.cpp	Tue Sep 29 12:10:38 2015 +0000
@@ -26,7 +26,7 @@
 static volatile bool  triggerSensorPolling = false;
 
 /* Restart Advertising on disconnection*/
-void disconnectionCallback(Gap::Handle_t handle, Gap::DisconnectionReason_t reason)
+void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)
 {
     ble.gap().startAdvertising();
 }
--- a/mbed.bld	Sat Jun 20 23:46:17 2015 +0000
+++ b/mbed.bld	Tue Sep 29 12:10:38 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file
--- a/nRF51822.lib	Sat Jun 20 23:46:17 2015 +0000
+++ b/nRF51822.lib	Tue Sep 29 12:10:38 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#7c68c8d67e1f
+http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#088f5738bf18