EverythingSmartHome / fingerprint-mqtt

Fingerprint sensor with MQTT support based on Adafruit Fingerprint Sensor Library
GNU General Public License v3.0
24 stars 14 forks source link

esp_task_wdt.h no such file or directory #28

Open gohigher14 opened 1 year ago

gohigher14 commented 1 year ago

I'm trying to compile : fingerprint-R503-mqtt-led-WDT.ino But i can't get it to work on my wemos d1 mini. I always get the error : esp_task_wdt.h no such file or directory But how can i solve this error? I really don't know where to find this esp_task_wdt.h

Arduino: 1.8.19 (Windows 10), Board: "LOLIN(WEMOS) D1 mini (clone), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, DOUT (compatible), 40MHz, 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

fingerprint_sensor:19:10: fatal error: esp_task_wdt.h: No such file or directory

Multiple libraries were found for "PubSubClient.h"

19 | #include

Used: C:\Users\Jo\Documents\Arduino\libraries\PubSubClient

  |          ^~~~~~~~~~~~~~~~

Not used: C:\Users\Jo\Documents\Arduino\libraries\ESP8266_Microgear

compilation terminated.

exit status 1

esp_task_wdt.h: No such file or directory

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

unseemlycoder commented 1 year ago

Hey @gohigher14,

This particular ino file you've referenced is designed to work with an ESP32xx based board. The header file your compiler is looking for is known as a watchdog timer (wdt). I've used it to reboot the microcontroller when WiFi connection is lost or reset, as there is no WiFi reconnection strategy implemented in this code base. You can checkout https://github.com/EverythingSmartHome/fingerprint-mqtt/issues/11#issuecomment-1290430450 for more info.

https://github.com/EverythingSmartHome/fingerprint-mqtt/issues/24 has your 8266 based code with an R503 sensor. Do take a look! as might solve your issue. However, wdt is not implemented in #24.

For your ESP8266 based board, you have the option of removing the wdt and use the code (It will get stuck if you lose WiFi connection momentarily, as reconnection is not implemented) or you can replace the esp_task_wdt.h library with its 8266 equivalents (Example: https://techtutorialsx.com/2017/01/21/esp8266-watchdog-functions/).

Similarly,

Multiple libraries were found for "PubSubClient.h" I believe you need to install the MQTT pubSub library from library manager.

Let me know if you need anything else. Thanks!

unseemlycoder commented 1 year ago

In case you are using an FPM10A fingerprint scanner with your wemos d1 mini (ESP8266), please use the default code: https://github.com/EverythingSmartHome/fingerprint-mqtt/blob/master/fingerprint-mqtt/fingerprint-mqtt.ino (No wdt)

gohigher14 commented 1 year ago

FPM10A fingerprint scanner

Hi,

Thanks for the help. I've installed the one you suggested in #24 . But now i'm getting lots of error reading from my scanner. And this without touching my scanner . :)

Connected, IP address: 192.168.129.92 Configuring WDT... Attempting MQTT connection...connected Image taken Image converted Match! Found ID #10 with confidence of 0 Image taken Unknown error Image taken Image converted Match! Found ID #10 with confidence of 0 Image taken Image converted Did not find a match Image taken Unknown error Image taken Communication error Image taken Image converted Match! Found ID #10 with confidence of 0 Unknown error Image taken Image converted Match! Found ID #10 with confidence of 0 Image taken Image converted Did not find a match Image taken Image converted Did not find a match Image taken Image converted Did not find a match Image taken Image converted Did not find a match Image taken Unknown error Image taken Communication error

gohigher14 commented 1 year ago

Hey @gohigher14,

This particular ino file you've referenced is designed to work with an ESP32xx based board. The header file your compiler is looking for is known as a watchdog timer (wdt). I've used it to reboot the microcontroller when WiFi connection is lost or reset, as there is no WiFi reconnection strategy implemented in this code base. You can checkout #11 (comment) for more info.

24 has your 8266 based code with an R503 sensor. Do take a look! as might solve your issue. However, wdt is not implemented in #24.

For your ESP8266 based board, you have the option of removing the wdt and use the code (It will get stuck if you lose WiFi connection momentarily, as reconnection is not implemented) or you can replace the esp_task_wdt.h library with its 8266 equivalents (Example: https://techtutorialsx.com/2017/01/21/esp8266-watchdog-functions/).

Similarly,

Multiple libraries were found for "PubSubClient.h" I believe you need to install the MQTT pubSub library from library manager.

Let me know if you need anything else. Thanks!

Can you help me out with replacing the esp_task_wdt.h library with its 8266 equivalents? I'm very new to this so i don't understand all well enough.