示例#1
0
 def set_angle_range(self, min_angle, max_angle, min_microseconds, max_microseconds):
     data = [self.sid]
     data.extend(utils.decTo256(min_angle))
     data.extend(utils.decTo256(max_angle))
     data.extend(utils.decTo256(min_microseconds))
     data.extend(utils.decTo256(max_microseconds))
     resp = self.brook.write(self.cid, 11, data)
示例#2
0
 def set_pid_speed(self, speed):
     data = utils.decTo256(speed)
     resp = self.brook.write(self.cid, 28, data)
     # print(utils.interpret(resp))
     self.desired_speed = speed
     if(self.collision):
         self.collision_detect()
示例#3
0
 def set_pid_angle(self, setpoint):
     data = utils.decTo256(setpoint)
     resp = self.brook.write(self.cid, 26,data)
示例#4
0
 def set_tpr(self):
     data = utils.decTo256(self.motor_type["tpr"])
     resp = self.brook.write(self.cid, 23, data)
示例#5
0
 def set_angle(self, angle):
     data = [self.sid]
     data.extend(utils.decTo256(angle)) #Set angle can now send values greater than 255 to the empire board to supprot wider range servos
     resp = self.brook.write(self.cid, 9, data)