ServoESP32
ServoESP32 copied to clipboard
Compatibility with ESP32-S2
Hello, thank you for developing this library. I am using the ESP32-S2 and from expressif's documentation, the PWM's are limited to 14-bits. As written, I have not been able to get the code to work on an S2, however, once I changed the ledcSetup call to 14, it works well.
From:
ledcSetup(_channel, 50, 16); // channel X, 50 Hz, 16-bit depth
To:
ledcSetup(_channel, 50, 14); // channel X, 50 Hz, 14-bit depth
You may want to consider with passing this as a variable or creating a function that allows this to be set. Thanks again.