Skip to content

[Feature] Allow gear train to be changed in the middle of a program #2510

@laurensvalk

Description

@laurensvalk

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 #2507

Metadata

Metadata

Assignees

No one assigned

    Labels

    software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)topic: controlIssues involving control system algorithmstopic: motorsIssues involving motors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions