I have got my voice HAT V1 working again on a PI B2 And am trying to control a servo.
With no voice hat software running and using the simple GPIO zero servo example, ( please ignore any typos in the code snippet below, my IPad keeps putting in capitals etc)
Code: Select all
From gpio zero import Servo
Import time
Myservo = Servo(21)
While True:
Myservo.min()
time.sleep(10)
Myservo.max()
time.sleep(10)
I am powering the servo from its own PSU, with a 0v connection between PSU and PI, with servo signal connected to PI.
If I repeat the experiment using a PI with no voice HAT there is no jitter in the servo, so I believe it is not the servo itself or wiring.
Has anyone else experienced this problem?
I have also tried using pigpio, servo still jitters but I get a buzzing from the loudspeaker, possibly because pigpio uses the DMA and PCM (audio chip?) to generate the PWM signals.
Cheers
Steve