RaspberryPiFoundation / python-build-hat

Build HAT Python library
MIT License
55 stars 19 forks source link

running motor simultaneously #200

Closed schultz77 closed 1 year ago

schultz77 commented 1 year ago

Hi there,

I'am trying to run four lego motors with raspberry pi 4 and build-hat simultaneously. Using MotorPair it worked well for 2 motors. Is there any possibility to run 2 motor pairs simultaneously?

This is probably not a bug but a feature. Thx in advance!

mutesplash commented 1 year ago

Have you tried it?

schultz77 commented 1 year ago

Hi mutesplash,

When I execute run_to_position for one motor pair (A, B) and then for the other one (C, D) they run after each other. First A. B then C, D. I would like to have a motor quadruple A, B, C, D.

Is it somehow possible and I misunderstood the documentation?

Thank you!

mutesplash commented 1 year ago

Have you specified to run them nonblocking?

schultz77 commented 1 year ago

Thank you for your quick reply! I'll try it and give you feedback at the latest tomorrow!

schultz77 commented 1 year ago

Hey mutesplash,

thank You very much. It works!