I got a Wemos D1 mini controlling a brushless motor. There were a couple of surprises along the way and I had to get my oscilloscope on it…
Have you tried this?
#include “esp_system.h”
void setup() {
ledcSetup(0, 50, 10); // 50 Hz 10bit resolution
ledcAttachPin(15, 0);
}
int min = 26; // (26/1024)*20ms ≒ 0.5 ms (-90°)
int max = 123; // (123/1024)*20ms ≒ 2.4 ms (+90°)
int n = min;
void loop() {
ledcWrite(0, n);
n+=5;
if (n < max) n = min;
delay(500);
}
What does it do? Set up pulses manually with no need for servo library?