Some project code fails to compile?¶
Q1: 'ledcAttach' was not declared in this scope
¶
When using LEDs, RGB LEDs, or passive buzzers, you will need the ESP32 board’s LEDC peripheral to generate PWM signals. However, the ESP32 board was recently upgraded to version 3.0, which caused changes in the function names and usage within the LEDC peripheral.
Therefore, we have updated our code accordingly. If you encounter ledc-related issues during compilation, please upgrade your ESP32 board to version 3.0 or higher.