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

MotorPair - motors not starting at same time #152

Open
chrisruk opened this issue Jun 16, 2022 · 5 comments
Open

MotorPair - motors not starting at same time #152

chrisruk opened this issue Jun 16, 2022 · 5 comments

Comments

@chrisruk
Copy link
Contributor

chrisruk commented Jun 16, 2022

See https://forums.raspberrypi.com/viewtopic.php?p=2012025 for more information

Also see for possible solution https://github.com/RaspberryPiFoundation/python-build-hat/tree/motorset/buildhat , might need to look at firmware

@chrisruk chrisruk added the working on Currently working on label Aug 25, 2022
@chrisruk
Copy link
Contributor Author

Working on refactoring Motor classes and reducing delay of motor commands

@mutesplash
Copy link
Contributor

In firmware?

@chrisruk chrisruk added blocked and removed working on Currently working on labels Sep 5, 2022
@chrisruk
Copy link
Contributor Author

chrisruk commented Sep 5, 2022

In the library at the moment, although there's an odd issue i'm running into, that may need a firmware change

@chrisruk
Copy link
Contributor Author

chrisruk commented Sep 6, 2022

The following for two blue+white (typeid 49) motors reduces the delay between each starting for me -

#!/usr/bin/python3
import time

from buildhat import MotorPair

motors = MotorPair('A', 'B')
motors._leftmotor.plimit(1.0)
motors._leftmotor.bias(0.4)
motors._rightmotor.plimit(1.0)
motors._rightmotor.bias(0.4)

motors.start(-30, -30)
time.sleep(5)
motors.stop()

motors.start(30, 30)
time.sleep(5)
motors.stop()

@ArnavDagar
Copy link

I tried the plimit and bias methods, but I am still struggling with it. Do you know when this will be fixed? Thanks!

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

No branches or pull requests

3 participants