Project aiming to do a Bluetooth Low Energy IoT devices, which measure temperature and humidity. Bluetooth achieved with the IDB05A1 shield. Temperature/humidity achieved with a DHT11 sensor. Project working, tested on an STM32 L476 board.
Dependencies: BLE_API X_NUCLEO_IDB0XA1 mbed
Diff: main.cpp
- Revision:
- 1:023e1eae2048
- Parent:
- 0:d2c18f736df1
- Child:
- 2:c0bd998cb02f
diff -r d2c18f736df1 -r 023e1eae2048 main.cpp --- a/main.cpp Fri Apr 07 11:36:47 2017 +0000 +++ b/main.cpp Tue Apr 18 14:08:50 2017 +0000 @@ -9,12 +9,12 @@ DigitalOut LED(LED1, 0); -const static char DEVICE_NAME[] = "DHT11"; +const static char DEVICE_NAME[] = "LED"; static const uint16_t uuid16_list[] = {DHT11Service::DHT11_UUID}; DHT11Service *dht11ServicePtr;//Bluetooth service that manage information and ble updates -uint32_t tempValue; -uint32_t humiValue; +uint8_t tempValue; +uint8_t humiValue; DHT11 dht11(PC_10);//Data pin of the DTH11 sensor Ticker updateTick; @@ -96,6 +96,7 @@ } } + int main(void) { BLE &ble = BLE::Instance();