This software mesurements temperature, humidity and pressure by i2c sensors bellow.
CO2 sensor(SGP30) is optional, because high consumption. (But default is use SGP30)
if you do not use CO2 sensor, comment-out CONFIG_SGP30.
- nRF52 module: https://docid81hrs3j1.cloudfront.net/medialibrary/2019/06/isp_ble_DS1507.pdf
- Sensors
- Software environmet: nRF Connect SDK v2.0.0
| pin# | |
|---|---|
| LED gpio | 0.11 |
| I2C SCL | 0.28 |
| I2C SDA | 0.29 |
- Service UUID
c7839aa8-1903-40b5-a8f0-426e09ffb390 - Characteristic UUID
c7839aa9-1903-40b5-a8f0-426e09ffb390
Data format is this.
typedef struct {
int battery_mV;
float temperature;
float humidity;
float pressure;
#ifdef CONFIG_SGP30
uint16_t co2;
uint16_t tvoc;
#endif
} send_data_t;Receive data by pc examle: test/ble_from_pc.py