jkb-git / ESP32Servo

Arduino-compatible servo library for the ESP32
133 stars 100 forks source link

Library not compatible with more than 2 servos #11

Open Suke0811 opened 8 months ago

Suke0811 commented 8 months ago

Problem

When we try to command more than two servos, only the two servo motors function as expected. The rest does not move at all. All servos individually run if only one servo is used in the code. The example is:

servo0.attach(pin0);   
servo1.attach(pin1);
servo2.attach(pin2);   // This servo does not turn with .write()
servo3.attach(pin3);   // This servo does not turn with .write()

If we switch the order, then two motors (servo2 and servo3) run instead

servo2.attach(pin2);   
servo3.attach(pin3);
servo0.attach(pin0);   // This servo does not turn with .write()
servo1.attach(pin1);   // This servo does not turn with .write()

Potential Reasons

This issue has already been reported in the community. https://forum.arduino.cc/t/esp32-s3-not-working-with-2-servos/1157409/9

Current Workaround

ESP32-S2 AnalogWrite Library works with more than two servos. We have tested with 4 servos. https://forum.arduino.cc/t/esp32-s3-not-working-with-2-servos/1157409/14

f1owkang commented 7 months ago

thanks!!!!!it is very useful,i well try it later.