Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move motor to absolute position #6

Open
KonerDev opened this issue Aug 4, 2023 · 0 comments
Open

Move motor to absolute position #6

KonerDev opened this issue Aug 4, 2023 · 0 comments

Comments

@KonerDev
Copy link

KonerDev commented Aug 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant