support
support copied to clipboard
[Feature] Allow gear train to be changed in the middle of a program
Hi, we want to change an attachment on our spike prime FLL robot and specify the gear train for the new attachment. How do we do that. I tried to stop() and then close() the motor which is what I saw online, but it doesn't like it, specifically the stop(). So, I tried to just close() the motor, but when I re-create the motor, I get an exception "This can only be called before multitasking starts." But we are in the middle of the program, so run_task() has already been called.
Is there a way to change the gear train in the middle of a program?
Originally posted by @dss0427 in https://github.com/pybricks/support/discussions/2507