Timeout Probem
Posted: Thu Mar 10, 2022 10:20 am
Im making a robot that has 4 brushless motors for the wheels and whenever I would launch the program the wheels do not start at once. Then I keep getting the error of Phidget timeout. please look at the code below for it
fl = BLDCMotor()
bl = BLDCMotor()
br = BLDCMotor()
fr = BLDCMotor()
fl.setHubPort(1)
bl.setHubPort(2)
br.setHubPort(4)
fr.setHubPort(3)
fl.openWaitForAttachment(1500)
fr.openWaitForAttachment(1500)
bl.openWaitForAttachment(1500)
br.openWaitForAttachment(1500)
fl.setTargetVelocity(1)
fr.setTargetVelocity(-1)
bl.setTargetVelocity(1)
br.setTargetVelocity(-1)
try:
input("Press Enter to Stop\n")
except (Exception, KeyboardInterrupt):
pass
position=fl.getPosition()
print(position)
fl.close()
bl.close()
fr.clos()
br.close()
The area where the phidget times out is when the br is set to -1 for the velocity
fl = BLDCMotor()
bl = BLDCMotor()
br = BLDCMotor()
fr = BLDCMotor()
fl.setHubPort(1)
bl.setHubPort(2)
br.setHubPort(4)
fr.setHubPort(3)
fl.openWaitForAttachment(1500)
fr.openWaitForAttachment(1500)
bl.openWaitForAttachment(1500)
br.openWaitForAttachment(1500)
fl.setTargetVelocity(1)
fr.setTargetVelocity(-1)
bl.setTargetVelocity(1)
br.setTargetVelocity(-1)
try:
input("Press Enter to Stop\n")
except (Exception, KeyboardInterrupt):
pass
position=fl.getPosition()
print(position)
fl.close()
bl.close()
fr.clos()
br.close()
The area where the phidget times out is when the br is set to -1 for the velocity