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
- Temperature Service : Gatt profile details from bluetooth.org
- Temperature Measurement : Gatt Characteristic details
- Temperature Type : Gatt Characteristic details
mbed_app.json@17:9ce6c0171634, 2016-09-20 (annotated)
- Committer:
- Vincent Coubard
- Date:
- Tue Sep 20 13:47:58 2016 +0100
- Revision:
- 17:9ce6c0171634
Update the libraries.
Add st shield support.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Vincent Coubard |
17:9ce6c0171634 | 1 | { |
Vincent Coubard |
17:9ce6c0171634 | 2 | "target_overrides": { |
Vincent Coubard |
17:9ce6c0171634 | 3 | "K64F": { |
Vincent Coubard |
17:9ce6c0171634 | 4 | "target.features_add": ["BLE"], |
Vincent Coubard |
17:9ce6c0171634 | 5 | "target.extra_labels_add": ["ST_BLUENRG"], |
Vincent Coubard |
17:9ce6c0171634 | 6 | "target.macros_add": ["IDB0XA1_D13_PATCH"] |
Vincent Coubard |
17:9ce6c0171634 | 7 | }, |
Vincent Coubard |
17:9ce6c0171634 | 8 | "NUCLEO_F401RE": { |
Vincent Coubard |
17:9ce6c0171634 | 9 | "target.features_add": ["BLE"], |
Vincent Coubard |
17:9ce6c0171634 | 10 | "target.extra_labels_add": ["ST_BLUENRG"] |
Vincent Coubard |
17:9ce6c0171634 | 11 | } |
Vincent Coubard |
17:9ce6c0171634 | 12 | } |
Vincent Coubard |
17:9ce6c0171634 | 13 | } |