from comm.pwm import PWM from time import sleep # CALIBRATION driver = PWM(0x41) driver.setPWMFreq(50) print("Hello world!") print("Turning off all the 12 servos...") for ch in range(12): driver.setPWM(ch, 0, 0) pass print("...done.") def get_channel(): ch = 0 while True: ch = input("Input which channel you want to calibrate (0-11): ") try: ch = int(ch) except: print("That is not an integer. Try again.") continue if ch >= 0 and ch < 12: break
from comm.pwm import PWM from time import sleep # CALIBRATION CHANNEL = 0 # Channel of the servo joint VALUE = 0 # Value to accomplish the pose DELAY = 0.5 driver = PWM(0x40) driver.setPWMFreq(50) while True: driver.setPWM(CHANNEL, 0, VALUE) sleep(DELAY)