Open shaggy63 opened 4 years ago
When a drive motor starts moving or changes direction it would be beneficial for the life of the motors to ramp the speed up instead of having a sudden jump from 0 to max speed. Also recommended for blade starts.
Something like:
while (speed_now < PWM_MaxSpeed) delay(20); analogWrite(ENAPin, speed_now ); analogWrite(ENBPin, speed_now ); speed_now =speed_now +20;
if (speed_now > PWM_MaxSpeed) { speed_now = PWM_MaxSpeed; }
}
When a drive motor starts moving or changes direction it would be beneficial for the life of the motors to ramp the speed up instead of having a sudden jump from 0 to max speed. Also recommended for blade starts.
Something like:
while (speed_now < PWM_MaxSpeed) delay(20); analogWrite(ENAPin, speed_now ); analogWrite(ENBPin, speed_now ); speed_now =speed_now +20;
}