-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi, very happy to have found this library. I'd like to integrate several Mijia temp sensors in a home monitoring system.
Is your feature request related to a problem? Please describe.
The example (ESP32_ATC_MiThermometer_Client.ino) works well. However the miThermometer.getData() is blocking.
It's not a good news to have the ESP32 blocked for 5 seconds and not reacting to the user inputs
Describe the solution you'd like
A callback mechanism, integrated in the ATC_MiThermometer class, that would manage the sensor callbacks
- semaphores to know whether new data is available or not
Describe alternatives you've considered
Make use of FreeRtos to launch getData in a seperate task. But I'm not sure it's compatible with NimBLEDevice.h/.cpp
Additional context
Ideally my system would include a touchscreen and implement a thermostat feature.
Blocking that for 5s is not acceptable