ServoESP32
ServoESP32 copied to clipboard
Incompatible with Preference.h (Flash writing)
On a Firebeetle ESP32 board, Servo.h can make it impossible to write to Onboard Flash. Reproduce like this:
- Attach more than 8 servos (I used 9) (in software; hardware doesn't matter)
- Sometimes required, sometimes not: Output PWM on 9th attached servo using any pin. It is not important what you do with the first 8 servos or if you use them at all.
- Try to use Preferences.h to write to on-board Flash: Cannot write, and read only returns the default value. No error messages.
- Detach Servos
- Try to use Preferences.h again: Works fine
The error occurs irrespective of what pins are used for the Servo. I suspect a problem with timer allocation or something like that, but I am no expert in ESP32 timers or the two libraries involved.