Skip to content

Move motor to absolute position #6

@KonerDev

Description

@KonerDev

How can I set the motor A to 20°, for example?

import mindstorms
import time

hub = mindstorms.Hub()

time.sleep(1)

motor_a = hub.port.A.motor
motor_a.run_to_position(20)

Because this code only moves the motor +20° relative to its position at start-up.
If this is not yet possible, adding such a method would be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions