Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_B-L475E-IOT01
EnvironmentalService Class Reference
BLE Environmental Service. More...
#include <EnvironmentalService_v2.h>
Public Member Functions | |
| EnvironmentalService (BLE &_ble) | |
| EnvironmentalService constructor. | |
| void | updateTemperature (TemperatureType_t newTemperatureVal) |
| Update temperature characteristic. | |
| void | updateHumidity (HumidityType_t newHumidityVal) |
| Update humidity characteristic. | |
| void | updatePressure (PressureType_t newPressureVal) |
| Update pressure characteristic. | |
Detailed Description
BLE Environmental Service.
- Note:
- Modified service (refer to EnvironmentalService.h):
- notifications added
- conversion to temperature, humidity and pressure integer values done in main.cpp
- updateTemperature() input argument type changed from float to TemperatureType_t This service provides temperature, humidity and pressure measurement. Service: https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.environmental_sensing.xml Temperature: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.temperature.xml Humidity: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.humidity.xml Pressure: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.pressure.xml
Definition at line 39 of file EnvironmentalService_v2.h.
Constructor & Destructor Documentation
| EnvironmentalService | ( | BLE & | _ble ) |
EnvironmentalService constructor.
- Parameters:
-
ble Reference to BLE device. temperature_en Enable this characteristic. humidity_en Enable this characteristic. pressure_en Enable this characteristic.
Definition at line 52 of file EnvironmentalService_v2.h.
Member Function Documentation
| void updateHumidity | ( | HumidityType_t | newHumidityVal ) |
Update humidity characteristic.
- Parameters:
-
newHumidityVal New humidity measurement.
Definition at line 90 of file EnvironmentalService_v2.h.
| void updatePressure | ( | PressureType_t | newPressureVal ) |
Update pressure characteristic.
- Parameters:
-
newPressureVal New pressure measurement.
Definition at line 103 of file EnvironmentalService_v2.h.
| void updateTemperature | ( | TemperatureType_t | newTemperatureVal ) |
Update temperature characteristic.
- Parameters:
-
newTemperatureVal New temperature measurement.
Definition at line 77 of file EnvironmentalService_v2.h.
Generated on Wed Jul 13 2022 01:02:12 by
1.7.2