-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I noticed that motors seem to keep some momentum after they are stopped and started again when using the current main branch. There also seems to be quite a long spin-up time in this case.
An example script to simulate the behaviour:
from buildhat import Motor
import time
speed = 50
delay = 4
delay_stop = 2
motor = Motor('A')
while True:
print(f"Start {speed}")
motor.start(speed)
time.sleep(delay)
print("Stop")
motor.stop()
time.sleep(delay_stop)
print(f"Start {-speed}")
motor.start(-speed)
time.sleep(delay)
print("Stop")
motor.stop()
time.sleep(delay_stop)Motor behaviour:
buildhat_motor_stop.mp4
Are there some settings I can tweak to improve the responsiveness in this case? I noticed that using motor.set_speed_unit_rpm(True) already reduces the momentum issue somewhat (and improves the spin-up time significantly).
tomasjanu, danielr and vliedel
Metadata
Metadata
Assignees
Labels
No labels