I'm using the PIGPIO library to control my servos. It's working great for controlling one servo, but when I'm using multiple, they're acting crazy. They move by themselves to random positions continuously and they react verrrryy slowly and badly to my pulse signals.
Code: Select all
...
GPIO.setmode(GPIO.BCM)
pinLeft= 6
pinMiddle=5
pinRight = 4
pinServos = [pinRight, pinMiddle, pinLeft]
pi = pigpio.pi()
for x in pinServos:
pi.set_mode(x, pigpio.OUTPUT)
pi.set_PWM_frequency(x, 33)
pi.set_servo_pulsewidth(x, 0)
pi.set_servo_pulsewidth(pinPoortL, 1000)
pi.set_servo_pulsewidth(pinPoortR, 1000)
pi.set_servo_pulsewidth(pinPoortM, 1000)