RaspberryPiFoundation / python-build-hat

Build HAT Python library
MIT License
52 stars 18 forks source link

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

Open PinkPantherPC opened 1 month ago

PinkPantherPC commented 1 month ago

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:

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

Thank you for your help!

Best regards, PinkPantherPC

mutesplash commented 1 month ago

What's "noticeable" and "significant"?

PinkPantherPC commented 1 month ago

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!