This is a simple application of the XNUCLEO-IDB05A2 Bluetooth shield using a STM NUCLEO-64 F401RE board.
The board, the shield and the sensor are connected very simply, remembering the pinout of the DHT11.
Let's describe the project.
First you need to install the library on Arduino IDE https://github.com/stm32duino/STM32duinoBLE.
In order for the shield to be recognized and used by the board we will have to add a configuration file to our project, as indicated in the example on the site mentioned above.
At this point, just upload an example from the STM32duinoBLE library to Arduino IDE and try.
I have run some of the examples present and based myself on them to realize my project for reading and transmitting temperature and humidity data.
The Arduino IDE configurations are, in this case:
We want to make a simple project to read environmental information (temperature and humidity) and send them using Bluetooth BLE to nearby devices.
Just connect the STM32 F401RE board with the XNUCLEO-IDB05A2 shield with the DHT11 sensor, following the pinout shown and connecting the "Data" pin to digital pin 2 of the Arduino socket.
The code is very simple and is among the attachments.
Real-time temperature and humidity measurements can be read using a PC or smartphone and a specific app, such as the one shown in the figure:
Comments