Wio Terminal - How to use multiple servos?

Hi,

I’m working on a simple application that include two different servos motor (DM996).
I don’t need to operate the motors simultaneously.

I have troubles making the two motor properly working in the same program using the Servo.h library:

#include <Servo.h>

Servo myservo;
Servo myservo1;

void setup() {

myservo.attach(A6); //BCM13

myservo1.attach(A8); //BCM26

}

void loop() {

myservo.write(50);

delay(1000);

myservo.write(120);

delay(500);

myservo1.write(50);

delay(1000);

myservo1.write(120);

delay(500);

}

When I run the program above, only the first initialized motor (myservo) works properly, the other one makes random movements. This issue happens only when I initialized both motors.

I’m currently using a Servo.h library adapted for the SAMD51 boards, I tried the same program on a Arduino Uno board and the program run flawlessly.

Maybe I’m using the wrong library or board pins?

Thank you in advance

HI , amper_auto

  1. May I ask how you wired it?
  2. Is there any other power supply

I think the not enough power