Helo! I have tisi problem in compilitation .
Error in thi void :
void WiFiEvent(WiFiEvent_t event) {
Serial.printf(“[WiFi-event] event: %d\n”, event);
switch(event) {
This is error
Arduino:1.8.18 (Windows 10), Scheda:”DOIT ESP32 DEVKIT V1, 80MHz, 921600, None, Disabled”
C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_579466\ESP32_Client_1_LED_DS18B20.ino: In function ‘void WiFiEvent(arduino_event_id_t)’:
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_READY’ not handled in switch [-Werror=switch]
switch(event) {
^
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_SCAN_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_CONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_LOST_IP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STACONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STADISCONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_FTM_REPORT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_CONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_DISCONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_GOT_IP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_SUCCESS’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_FAILED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_TIMEOUT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_PIN’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_PBC_OVERLAP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_SCAN_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_FOUND_CHANNEL’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_GOT_SSID_PSWD’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_SEND_ACK_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_INIT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_DEINIT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_END’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_RECV’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_FAIL’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_SUCCESS’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20:55:9: error: enumeration value ‘ARDUINO_EVENT_MAX’ not handled in switch [-Werror=switch]
cc1plus.exe: some warnings being treated as errors
Più di una libreria trovata per “WiFi.h”
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\WiFi
Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
enumeration value ‘ARDUINO_EVENT_WIFI_READY’ not handled in switch [-Werror=switch]
Questo report potrebbe essere più ricco di informazioni abilitando l’opzione
“Mostra un output dettagliato durante la compilazione”
in “File -> Impostazioni”
Hi.
In your code, replace SYSTEM_EVENT_STA_GOT_IP with ARDUINO_EVENT_WIFI_STA_GOT_IP
And SYSTEM_EVENT_STA_DISCONNECTED with ARDUINO_EVENT_WIFI_STA_DISCONNECTED.
Let me know if this solves the problem.
Regards,
Sara
Hi unfortunately it continues to give me an error
Arduino:1.8.18 (Windows 10), Scheda:”DOIT ESP32 DEVKIT V1, 80MHz, 921600, None, Disabled”
C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_281161\ESP32_Client_1_LED_DS18B20_corretto.ino: In function ‘void WiFiEvent(arduino_event_id_t)’:
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_READY’ not handled in switch [-Werror=switch]
switch(event) {
^
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_SCAN_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_CONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_AUTHMODE_CHANGE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_STA_LOST_IP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STACONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STADISCONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_STAIPASSIGNED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_PROBEREQRECVED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_AP_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WIFI_FTM_REPORT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_STOP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_CONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_DISCONNECTED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_GOT_IP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_ETH_GOT_IP6’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_SUCCESS’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_FAILED’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_TIMEOUT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_PIN’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_WPS_ER_PBC_OVERLAP’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_SCAN_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_FOUND_CHANNEL’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_GOT_SSID_PSWD’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_SC_SEND_ACK_DONE’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_INIT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_DEINIT’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_START’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_END’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_RECV’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_FAIL’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_PROV_CRED_SUCCESS’ not handled in switch [-Werror=switch]
ESP32_Client_1_LED_DS18B20_corretto:55:9: error: enumeration value ‘ARDUINO_EVENT_MAX’ not handled in switch [-Werror=switch]
cc1plus.exe: some warnings being treated as errors
Più di una libreria trovata per “WiFi.h”
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\WiFi
Non usata: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
enumeration value ‘ARDUINO_EVENT_WIFI_READY’ not handled in switch [-Werror=switch]
Hi.
I just tested the code and it is working fine for me.
Go to File > Preferences -> compiler warnigs-> to default. See if that solves the issue.
I had some readers previously with that issue, and I’m not sure what caused the problem, but take a look at the following discussion:
Let me know if the problem is solved.
Regards,
Sara
Hi Sara
I canceled all the warnings and miraculously it compiled the program without problems. I’ll do the full test tomorrow. I don’t understand why the compiler hangs if the warnings are not serious. Thanks for the help
Regard
Giorgio