Page 1 of 1

No Servo library compiling - LEDC errors

Posted: Tue Apr 16, 2024 7:54 pm
by frank0
Beginner trying to use a servo for the first time. Tried a whole bunch of different servo libraries and examples, but none of the code compiles. All errors point to the LEDC API, and it seems there are breaking changes in 3.0 that have not been updated in those libraries.

For example:

Code: Select all

ESP32Servo\src\ESP32PWM.cpp:263:9: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'?
But according to the ESP32 2.x - 3.0 migration page, ledcDetachPin no longer exists.

Do I just need to wait until people update those libraries if I don't have the skills to do it manually? Is this a current known issue? My search has not lead me anywhere useful.

My actual sketches are irrelevant to the problem, all I need to do to reproduce is #include "Servo.h" or ESP32Servo.h, or any other servo library.

Re: No Servo library compiling - LEDC errors

Posted: Wed Apr 17, 2024 6:52 am
by lbernstone
Yes, you will have to wait for other people to fix the code you want to use.
There is no reason for you to be on the bleeding edge if you don't know how to fix it. arduino-esp32 v2.0.15 was released last week and the libraries will work well with it.

Re: No Servo library compiling - LEDC errors

Posted: Wed Apr 17, 2024 9:49 am
by frank0
lbernstone wrote:
Wed Apr 17, 2024 6:52 am
Yes, you will have to wait for other people to fix the code you want to use.
There is no reason for you to be on the bleeding edge if you don't know how to fix it. arduino-esp32 v2.0.15 was released last week and the libraries will work well with it.
Thank you very much for confirming my suspicion. I wasn't aware that I had placed myself on the bleeding edge, I will take a couple of steps back! :)

EDIT: Confirmed all good with 2.0.11. THANKS