I am trying to initialize the watchdog timer.
I have installed
arduino-esp32-master.zip
I have
#include <esp_task_wdt.h>
set but it is not highlighted red indicating the IDE knows about it.
The error indicates that a major function is not present.
full error:
Arduino: 1.8.13 (Linux), TD: 1.53, Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"
/home/brad/Documents/bradcode/Arduino/esp32s-infrared-ac-wifi-server-v4/esp32s-infrared-ac-wifi-server-v4.ino: In function 'void setup()':
esp32s-infrared-ac-wifi-server-v4:229:23: error: 'WDT_TIMEOUT' was not declared in this scope
esp_task_wdt_init(WDT_TIMEOUT, true); //enable panic so ESP32 restarts
^
Multiple libraries were found for "IRremote.h"
Used: /home/brad/Documents/bradcode/Arduino/libraries/IRremote
Not used: /home/brad/Documents/bradcode/Arduino/libraries/Arduino-IRremote-master
Not used: /home/brad/Documents/bradcode/Arduino/libraries/IRremote-2.8.1
Multiple libraries were found for "WiFi.h"
Used: /home/brad/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi
Not used: /home/brad/Downloads/arduino-1.8.13/libraries/WiFi
Not used: /home/brad/Documents/bradcode/Arduino/libraries/WiFiEspAT
exit status 1
'WDT_TIMEOUT' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
What library did I fail to install to get the watchdog timer initialized?
UPDATE:
My additional boards URLs
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json,http://arduino.esp8266.com/stable/package_esp8266com_index.json
After following recommendations for poster, I got past that error and hit another one right away.
Arduino: 1.8.13 (Linux), TD: 1.53, Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"
In file included from /home/brad/Documents/bradcode/Arduino/esp32s-infrared-ac-wifi-server-v4/esp32s-infrared-ac-wifi-server-v4.ino:24:0:
/home/brad/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.h: In member function 'virtual size_t WebServer::_currentClientWrite_P(const char*, size_t)':
/home/brad/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WebServer/src/WebServer.h:144:83: error: 'class WiFiClient' has no member named 'write_P'
virtual size_t _currentClientWrite_P(PGM_P b, size_t l) { return _currentClient.write_P( b, l ); }
^
/home/brad/Documents/bradcode/Arduino/esp32s-infrared-ac-wifi-server-v4/esp32s-infrared-ac-wifi-server-v4.ino: In function 'void setup()':
esp32s-infrared-ac-wifi-server-v4:246:10: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_STA);
^
esp32s-infrared-ac-wifi-server-v4:246:15: error: 'WIFI_STA' was not declared in this scope
WiFi.mode(WIFI_STA);
^
esp32s-infrared-ac-wifi-server-v4:251:73: error: no matching function for call to 'WiFiClass::config(IPAddress&, IPAddress&, IPAddress&, IPAddress&, IPAddress&)'
if (!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
^
In file included from /home/brad/Documents/bradcode/Arduino/esp32s-infrared-ac-wifi-server-v4/esp32s-infrared-ac-wifi-server-v4.ino:22:0:
/home/brad/Documents/bradcode/Arduino/libraries/WiFiEspAT/src/WiFi.h:72:8: note: candidate: bool WiFiClass::config(IPAddress, IPAddress, IPAddress, IPAddress)
bool config(IPAddress local_ip, IPAddress dns_server = INADDR_NONE, IPAddress gateway = INADDR_NONE, IPAddress subnet = INADDR_NONE);
^
/home/brad/Documents/bradcode/Arduino/libraries/WiFiEspAT/src/WiFi.h:72:8: note: candidate expects 4 arguments, 5 provided
Multiple libraries were found for "IRremote.h"
Used: /home/brad/Documents/bradcode/Arduino/libraries/IRremote
Not used: /home/brad/Documents/bradcode/Arduino/libraries/IRremote-2.8.1
Not used: /home/brad/Documents/bradcode/Arduino/libraries/Arduino-IRremote-master
exit status 1
'class WiFiClass' has no member named 'mode'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I have some library mixed up still
-
What do you mean you have "installed" arduino-esp32-master.zip? You don't install these things - you put the JSON URL in the preferences and install the board definitions using the boards manager.Majenko– Majenko2021年02月21日 14:43:04 +00:00Commented Feb 21, 2021 at 14:43
-
@Majenko I updated the post with my URLs. I should have the correct ones already loaded.brad– brad2021年02月21日 15:20:02 +00:00Commented Feb 21, 2021 at 15:20
1 Answer 1
There is no such macro in the ESP32 core. That parameter is just the number of seconds before a timeout occurs. Just pick a reasonable value. 5 seconds seems to be a commonly used (and appears to be used in the core) value.
-
setting the variable the line above caused the same error. So I deleted the variable all together and just plugged in the number 5. Now I am at a new error. 'class WiFiClass' has no member named 'mode'. I still have some library all messed up.brad– brad2021年02月22日 01:02:58 +00:00Commented Feb 22, 2021 at 1:02
-
I have multiple wifi.h libraries as indicated in the errors posted. I just tried a different one and got past that other new error. Now I'm golden.brad– brad2021年02月22日 01:11:16 +00:00Commented Feb 22, 2021 at 1:11