Hello,
I want to ask you for help.
I need to send 2 sensor (temperature and pressure) data using BLE, similar to the “BLE_Server_DHT.ino” sample program.
My problem is that the client side is not another ESP-32 but a smartphone. My question is, would there be a .aia sample program possibly that takes and displays data from 2 sensors?
From this I could learn the android smartphone solution to read and display multiple sensor data BLE.
Thank you in advance for your help.
Best Regards,
Peter
Hi.
In the Learn ESP32 with Arduino IDE course,we have the following example:
If you understand how it works, you can easily add another field for pressure and remove the part that controls the output.
I hope this helps.
Regards,
Sara
Dear Sara,
Yes, I know this example of curriculum and it works for me. I’m not sure how to define several different sensor variables (e.g. 2-3 sensors – temperature, humidity, pressure) with the UUID on the android client side, if there is not only one TX UUID as in this example.
Therefore, I was looking for a .aia pattern for the server program “BLE_Server_DHT.ino”. On the esp32 server side I understand how the UUID identification of multiple sensors works in the sample program, I just want to see an example of sensor identification within the client-side .aia program.
Best Regards,
Peter
Hi.
At the moment, we don’t have any examples already built.
But, you can modify the .aia file provided in the project I’ve sent you before.
First, you would need to change the interface to add another text field to display the other reading.
Then, on the programming side:
You would need to create another RXUUID variable with the UUID of the other sensor reading characteristic.
Then, you would need to duplicate the blocks that register for that UUID, and the blocks that set the new readings on the user interface.
This Unit gives an overall explanation about how the app works: https://rntlab.com/module-11/bluetooth-low-energy-ble-android-application-with-mit-app-inventor-2/
I hope this helps.
Regards,
Sara