Hi,
We’ve been talking through the e-mail via the Tutorial Feedback. I copied a few the relevant responses into this forum so that we are on the same page.
Arduino Libraries
For the BME280 and SerLCD library, you can obtain those using the [Arduino Library Manager by doing a search for “SparkFun BME280” and “SparkFun SerLCD”. It sounds like you might have gotten these libraries installed though.
[AVR Based Serial Enabled LCDs Hookup Guide: Installing the Arduino Library
[GitHub: SerLCD Arduino Library
[SparkFun BME280 Breakout Hookup Guide: Installing the Arduino Library
[GitHub: SparkFun BME280 Arduino Library
The <WiFi.h>, <esp_now.h>, and <Wire.h> should automatically be included when you install the [Arduino Core for ESP32
Software Setup
The error code that you were seeing and provided in the e-mail, it does not seem like you installed the ESP32 board support files correctly. Make sure that you have installed the ESP32 board support files => [Installing a Third Party Board Definition or through espressif’s tutorial that was linked in our previous e-mail through their Arduino core for ESP32 => [ReadtheDoc: Espressif Arduino-ESP32 | Installing .
I was able to get the transmitter and receiver code to compile as expected from the tutorial using Arduino IDE v1.8.12, esp32 board support file v1.0.6 and v2.0.4, and selecting SparkFun ESP32 Thing Plus. I was using a computer with a Windows 10.
You stated in the e-mail that you removed & reinstalled the Arduino IDE and espressif files already. I’m not sure what your setup is but maybe we can recreate the issue that you are seeing if you can provide the following information.
What is your Arduino IDE version?
What is your ESP32 board definition version?
What is the board that you are selecting?
Wrong Library?
Hmm. From your e-mail, it seems as though your computer is pulling the WiFi.h from …Arduino\libraries\WiFi Arduino program folder’s path instead of the *…AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries* . Here’s part of the error that you provided in the e-mail (i.e. without the username and replaced by “…” ).
C:\Users\...\Documents\Arduino\sketch_aug14a\sketch_aug14a.ino: In function 'void loop()':
sketch_aug14a:26:8: error: 'class WiFiClass' has no member named 'mode'
WiFi.mode(WIFI_STA);
^~~~
sketch_aug14a:26:13: error: 'WIFI_STA' was not declared in this scope
WiFi.mode(WIFI_STA);
^~~~~~~~
sketch_aug14a:28:34: error: no matching function for call to 'WiFiClass::macAddress()'
Serial.println(WiFi.macAddress());
^
In file included from C:\Users\...\Documents\Arduino\sketch_aug14a\sketch_aug14a.ino:18:0:
D:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:137:14: note: candidate: uint8_t* WiFiClass::macAddress(uint8_t*)
uint8_t* macAddress(uint8_t* mac);
^~~~~~~~~~
D:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:137:14: note: candidate expects 1 argument, 0 provided
exit status 1
'class WiFiClass' has no member named 'mode'
Installing the ESP32 board support files should automatically install the WiFi folder in the correct path. Selecting the correct board (i.e. SparkFun ESP32 Thing Plus) should point it to the correct folder. Make sure that you are selecting the correct board definition as stated above.](Installing - - — Arduino ESP32 latest documentation)](https://learn.sparkfun.com/tutorials/installing-board-definitions-in-the-arduino-ide/installing-a-third-party-board-definition)](GitHub - espressif/arduino-esp32: Arduino core for the ESP32)](GitHub - sparkfun/SparkFun_BME280_Arduino_Library: An Arduino library to control the BME280 humidity and pressure sensor.)](https://learn.sparkfun.com/tutorials/sparkfun-bme280-breakout-hookup-guide#i)](GitHub - sparkfun/SparkFun_SerLCD_Arduino_Library: A library to seamlessly control the SparkFun SerLCD over I2C, SPI, and Serial.)](https://learn.sparkfun.com/tutorials/avr-based-serial-enabled-lcds-hookup-guide/all#sparkfun-serlcd-library)](https://learn.sparkfun.com/tutorials/installing-an-arduino-library/#using-the-arduino-library-manager)