adaptation for book and plug demo
Fork of BLE_API by
EnvironmentalService Class Reference
BLE Environmental Service. More...
#include <EnvironmentalService.h>
Public Member Functions | |
EnvironmentalService (BLE &_ble) | |
EnvironmentalService constructor. | |
void | updateHumidity (HumidityType_t newHumidityVal) |
Update humidity characteristic. | |
void | updatePressure (PressureType_t newPressureVal) |
Update pressure characteristic. | |
void | updateTemperature (float newTemperatureVal) |
Update temperature characteristic. |
Detailed Description
BLE Environmental Service.
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 30 of file EnvironmentalService.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 43 of file EnvironmentalService.h.
Member Function Documentation
void updateHumidity | ( | HumidityType_t | newHumidityVal ) |
Update humidity characteristic.
- Parameters:
-
newHumidityVal New humidity measurement.
Definition at line 68 of file EnvironmentalService.h.
void updatePressure | ( | PressureType_t | newPressureVal ) |
Update pressure characteristic.
- Parameters:
-
newPressureVal New pressure measurement.
Definition at line 78 of file EnvironmentalService.h.
void updateTemperature | ( | float | newTemperatureVal ) |
Update temperature characteristic.
- Parameters:
-
newTemperatureVal New temperature measurement.
Definition at line 88 of file EnvironmentalService.h.
Generated on Wed Jul 13 2022 09:31:10 by 1.7.2