• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ERROR ESP32_Client_1_LED_DS18B20

Q&A Forum › Category: ESP32 › ERROR ESP32_Client_1_LED_DS18B20
0 Vote Up Vote Down
giorgio patria asked 2 months ago

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”

Question Tags: MQTT - DS18B20 error
5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 months ago

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

0 Vote Up Vote Down
giorgio patria answered 2 months ago

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]
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 months ago

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:

  • https://rntlab.com/question/module-7-unit-3-mqtt-project-mqtt-client-esp32-1-error/

 
Let me know if the problem is solved.
Regards,
Sara

0 Vote Up Vote Down
giorgio patria answered 1 month ago

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

0 Vote Up Vote Down
Sara Santos Staff answered 1 month ago

I also don’t understand this warning. 
But I hope it is working now.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.