mindstorms icon indicating copy to clipboard operation
mindstorms copied to clipboard

Move motor to absolute position

Open KonerDev opened this issue 2 years ago • 0 comments

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.

KonerDev avatar Aug 04 '23 08:08 KonerDev