Closed Nehessy closed 3 years ago
The problem is obvious IMHO - read carefully this https://github.com/me-no-dev/ESPAsyncWebServer#important-things-to-remember - especially You can not use yield or delay or any function that uses them inside the callbacks then take a look into libraries you are using. ( https://github.com/adafruit/Adafruit-BMP085-Library/blob/2653740d262571075411c052bc5ad03892f1538b/Adafruit_BMP085.cpp#L106 , etc...). BTW pay attention about text formatting in the github next time. Otherwise it's a hardly readable mess.
The problem is obvious IMHO - read carefully this https://github.com/me-no-dev/ESPAsyncWebServer#important-things-to-remember - especially You can not use yield or delay or any function that uses them inside the callbacks then take a look into libraries you are using. ( https://github.com/adafruit/Adafruit-BMP085-Library/blob/2653740d262571075411c052bc5ad03892f1538b/Adafruit_BMP085.cpp#L106 , etc...). BTW pay attention about text formatting in the github next time. Otherwise it's a hardly readable mess.
Thanks for the advice. So what can I do to fix this?
The solution is simple - do all the sensor readings in the main loop lets say every 2 seconds and put the results to the global variables. Then in the callback just format these values to return strings. And no, don't use simple delay(2000) in the main loop between the measurements - you have to think about this as the timing is better to be done without using delay.
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.
Hi, I am doing a final year project which is a weather station Web with DHT22 sensor for temperature and humidity and pressure with BMP180 sensor all on the Huzzah ESP32 I need help because when a client connects to the server the monitor shows this error and the ESP32 restarts:
This is what the ESP exception decoder shows me:
This is my Arduino codes:
if you can help me it is really important for my degree.