Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def add_servos(self, name, channel, max_angle):
- # assert servo_nos in range(0, 16)
- self.servos[name] = Servo(servo_nos, max_angle)
- self.servos[name].min_value = int(0.001 / self.bit_time)
- self.servos[name].max_value = int(0.002 / self.bit_time)
- for n in name:
- add(['name'])
- # name(['name':'1a',
- # 'name':'1b',
- # 'name':"2c",
- # 'name':"2d",
- # 'name':"3e",
- # 'name':"3f",
- # 'name':"4g",
- # 'name':"4h"])
- listOne(name)
- for c in channel:
- add(['channel'])
- # servo_nos(['servo_nos':'0',
- # 'servo_nos':'1',
- # 'servo_nos':'3',
- # 'servo_nos':'4',
- # 'servo_nos':'6',
- # 'servo_nos':'7',
- # 'servo_nos':'9',
- # 'servo_nos':'10'])
- listTwo(channel)
- for m in max_angle:
- add(['max_angle'])
- # max_angle(['max_angle':'180'])
- listThree(max_angle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement