Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max speed slow ramp #15

Open
shaggy63 opened this issue Jun 2, 2020 · 0 comments
Open

Max speed slow ramp #15

shaggy63 opened this issue Jun 2, 2020 · 0 comments

Comments

@shaggy63
Copy link

shaggy63 commented Jun 2, 2020

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;
 }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant