Hi,
So we are planning on making a shooter to throw the boulders into the high goal. I need to be able to spin the shooter motor while the pneumatics are being retracted.
My thought would be to have another thread using Python's threading module and just starting a new thread for the motor but I don't know if that is the recommended way of accomplishing it. Here is an example of what I have. I need that for loop to be going while the pneumatics are being set to false.
Code:
if self.arm1.get()==True:
for i in range(100): #I need this to be on while the solenoids retract
self.shooter.set(1)
self.arm1.set(False)
self.arm2.set(False)
else:
self.arm1.set(True)
self.arm2.set(True)
for i in range(100): #I need this to be on while the solenoids retract
self.shooter.set(1)
self.arm1.set(False)
self.arm2.set(False)
Thanks!