• 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

Learn ESP32 with Arduino IDE page 361 ff

Q&A Forum › Learn ESP32 with Arduino IDE page 361 ff
0 Vote Up Vote Down
Steve Fisch asked 3 years ago

In this sketch (which i named ESP32_Client_1_LED_DS18B20) I am sure I have the libraries:

#include <WiFi.h>
extern “C” {
#include “freertos/FreeRTOS.h”
#include “freertos/timers.h”
}
#include <AsyncMqttClient.h>
#include <OneWire.h>
#include <DallasTemperature.h>

correct – I have reinstalled them from zip files I downloaded today.

I am also sure that I have the correct board manager URL’s installed

When I test or try to complie the sketch, I get the following errors:

ESP32_Client_1_LED_DS18B20:53:16: error: variable or field ‘WiFiEvent’ declared void
void WiFiEvent(WiFiEvent_t event) {
^
ESP32_Client_1_LED_DS18B20:53:16: error: ‘WiFiEvent_t’ was not declared in this scope
E:\00000 -E-Data\Arduino\ESP32_Client_1_LED_DS18B20\ESP32_Client_1_LED_DS18B20.ino: In function ‘void connectToWifi()’:
E:\00000 -E-Data\Arduino\ESP32_Client_1_LED_DS18B20\ESP32_Client_1_LED_DS18B20.ino:45:38: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
^
E:\00000 -E-Data\Arduino\ESP32_Client_1_LED_DS18B20\ESP32_Client_1_LED_DS18B20.ino: At global scope:
ESP32_Client_1_LED_DS18B20:53:16: error: variable or field ‘WiFiEvent’ declared void
void WiFiEvent(WiFiEvent_t event) {
^
ESP32_Client_1_LED_DS18B20:53:16: error: ‘WiFiEvent_t’ was not declared in this scope
exit status 1
variable or field ‘WiFiEvent’ declared void

 

Please let me know what I am doing wrong.

 

As always, many thanks,

Steve

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Did you change anything on the code provided?
Tell me the versions of the libraries you’re using and I’ll try it with those.
Regards,
Sara

0 Vote Up Vote Down
Steve Fisch answered 3 years ago

Hi Sara,

Please close this question/topic. I reinstalled Arduino IDE and reset my libraries – that resolved my issue.

As always,
Thanks!

Steve

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Ok.
I’m glad you found the issue.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
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] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

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

Copyright © 2013-2025 · 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.