View difference between Paste ID: G6ggaUTP and 3dDvuKBP
SHOW: | | - or go back to the newest paste.
1
from MotorBridgeI import MotorBridgeCape
2
from time import sleep
3
4
servo_name  =  1
5
frequency   =  50
6
7
motor = MotorBridgeCape()
8
motor.ServoInit( servo_name, frequency )
9
10
for angle in 0, 45, 90, 135, 180, 135, 90, 45, 0:
11
    sleep( 0.5 )
12
    motor.ServoMoveAngle( servo_name, angle )