Hi,
If I follow the above tutorial and use the Arduino IDE the project builds.
However, I am trying to do everything using VSC because I use ESP devices, raspbery PI and PICO.
When I try and build the project in VSC I get the error
‘ledcAttachChannel’ was not declared in this scope
Looking on the internet one fix is to use
‘ledcAttach’ instead.
However, this generates a similar error.
Could this be becuse I am using a later version of Arduino.h than the tutorial?
My platformio.ini file is
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps = ESP Async WebServer
arduino-libraries/Arduino_JSON @ 0.1.0
board_build.filesystem = littlefs
Before attemtping this tutorial I managed to build and run the littleFS example where a file is read and the data output to the serial monitor.
So I have some confidence in my Arduino set up.
cheers
Steve Gale
Hi.
You need to update your ESP32 boards in PlatformIO to use the latest version of the Arduino core, version 3.
Go to Home > Platforms, then click on the Updates tab at the top, and then update espressif32.
Let me know if this solves the issue.
Regards,
Sara
Hi,
Thanks for quick response.
Under platforms I do not have any options to update.
espressif32 is version 6.7
cheers
Steve
Hi.
It seems that platformIO doesn’t update to the latest core automatically.
After searching and testing for a while I found out that you need to include the following on your paltformio.ini file so that it uses core 3.0
platform_packages= framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.1 framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.1/esp32-arduino-libs-3.0.1.zip
This works for me.
Let me know if this solves your issue.
Regards,
Sara
That fixed it, brilliant, thanks for help.
You obviously know what to search for 🙂
Steve