I have 2 new Arduino Nano ESP32 boards and I can't get the ESP32Servo library to work properly with either one. I've tried the examples Sweep and Multiple-Servo with no luck, but the PWMExample does seem to work. I'm also a bit confused on which pins to use. Does the library use GPIO numbering? I can't seem to get any to work with the servo examples. Can anyone shed some light as to what I might be doing wrong? I have also tried multiple versions of the ESP32Servo library. I get no compile errors, but no PWM signals are being generated on any pins. Thanks!
I think the library uses GPIO, so wire the board accordingly. If that works for ANY example I would think that means it is the right choice, but maybe some examples have been changed.
I would try the GPIO option first, and if that fails, try the Arduino option.
Try Sweep and PWMExample, but remember to move the wires to the matching pin.
Example, if your code has pin 9 then these are the two different pins to use for the two different modes
Thanks for your reply! None of the "servo" examples seem to work, but I did figure out the PWM examples. It works fine with simple AnalogWrite and the LEDC api as well. However, it looks like the Nano ESP32 is limited to 4 or 5 simultaneous PWMs and I need more, so I'm going to use an external module for that instead.
Sorry, I forgot that code is broken in the library, change your espresssif boards entry to 2.0.17 Here is the link, look for ledc
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html