Open kammce opened 1 year ago
Also! The constructor should also take in a struct that identifies what voltage level represents slow decay and fast decay. Usually slow decay would mean setting both pins to HIGH and fast decay is setting both pins LOW, or vise versa.
Some motor controllers require two pwm signals to operate with speed control for both forward and reverse operations. A list of such drivers can be found below:
This
slow_decay()
function allows the user to control whether the motor is in slow decay or fast decay mode. The driver should default to slow decay. Fast decay allows the motor to coast when not driven by the driver or when reducing speed. Slow decay means braking when speed is reduced which tends to give a better and more linear drive response for control.