Servo on Google AIY

Posted on

Connecting a Servo to the Google Voice Hat (AIY) project board

On the board there is a column of pins marked servos. They can supply up to 25ma of PWM control signal. The signal control code uses GPIO.Zero library Python Script. The Servo-GPIO mapping:
servo 0: 26
servo 1: 06
servo 2: 13
servo 3: 05
servo 4: 12
servo 5: 24

Using a micro servo you can map the PWM period to determine the position of the servo. If the period is 3ms sending the following pulse:
0ms: -180″,
1ms : -270″,
1.5ms : 0″,
2ms : 90″
3ms : 180″