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

Question about PWM and motor control with Raspberry Pi 4B and Lego Build HAT #213

Open
PinkPantherPC opened this issue Aug 15, 2024 · 4 comments

Comments

@PinkPantherPC
Copy link

Hello everyone,

I am planning a project using a Raspberry Pi 4B and the Lego Build HAT to control motors and sensors. However, I have read that without using the pwm function, communication with the motors can be slow.

I got the information from another issue:

Could someone clarify to what extent this slowness affects motor performance? Specifically:

  • Do the motors start with a noticeable delay?
  • Do the motors start at significantly different times?
  • Are there any issues with sensor communication, or does that work without any problems?

Any insights or experiences you could share would be greatly appreciated.

Thank you for your help!

Best regards,
PinkPantherPC

@mutesplash
Copy link
Contributor

What's "noticeable" and "significant"?

@PinkPantherPC
Copy link
Author

PinkPantherPC commented Aug 16, 2024

By "noticeable," I mean whether there is a perceptible delay between when the command is issued in the program and when the motor actually starts running.

By "significant," I am referring to whether, when using MotorPair to start two motors simultaneously, the robot moves straight or veers off course due to differences in the starting times of the two motors.

This project involves a race with other robots, so it is crucial that the motors are extremely precise.

Thank you for your clarification!

@gregorianrants
Copy link

I have written an alternative library that overcomes this limitation of the official library.

you can find it here
https://github.com/gregorianrants/buildhat-alternative

@PinkPantherPC
Copy link
Author

Thank you very much. It will be very useful as the official library seems to have some inaccuracies.

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

3 participants