playfultechnology / node-redscape

Node-REDscape is a set of nodes, flows, and templates for monitoring and controlling escape room puzzle props using Node-RED
132 stars 39 forks source link

ESP32 Wifi - System_Event or Arduino_Event #6

Open MagicEk opened 1 year ago

MagicEk commented 1 year ago

I'm trying to get the new version of Redscape working with my ESP32.

I've tried to use parts of the WiFi and Json code from your button project but I'm getting errors when compiling the code. I've also tried your example code "button for ESP32 and MySQL". Getting the same errors when compiling.

In file included from C:\Users\Erik\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src/WiFi.h:31:0, from F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino:24: F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino: In function 'void setup()': C:\Users\Erik\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src/WiFiType.h:35:22: error: 'ARDUINO_EVENT_WIFI_STA_GOT_IP' is not a member of 'system_event_id_t'

define WiFiEvent_t system_event_id_t

                  ^

F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino:107:6: note: in expansion of macro 'WiFiEvent_t' }, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP);
^ F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino: In lambda function: button_playful_tech_esp32_v1:111:29: error: 'union system_event_info_t' has no member named 'wifi_sta_disconnected' Serial.println(info.wifi_sta_disconnected.reason); ^ In file included from C:\Users\Erik\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src/WiFi.h:31:0, from F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino:24: F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino: In function 'void setup()': C:\Users\Erik\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi\src/WiFiType.h:35:22: error: 'ARDUINO_EVENT_WIFI_STA_DISCONNECTED' is not a member of 'system_event_id_t'

define WiFiEvent_t system_event_id_t

                  ^

F:\Escape Room\Arduino\button_playful_tech_esp32_v1\button_playful_tech_esp32_v1.ino:113:8: note: in expansion of macro 'WiFiEvent_t' }, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_DISCONNECTED);
^ Multiple libraries were found for "WiFi.h" Used: C:\Users\Erik\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi Unused: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries\WiFi exit status 1 'union system_event_info_t' has no member named 'wifi_sta_disconnected'

Been searching on google for help but havn't found anything helpful, I'm new to coding and would appreciate any help.

Best regards Erik

alastaira commented 6 months ago

Can you try upgrading to the latest version of the esp-core? (currently v2.0.14)