Skip to content

Acceleration Issue #19

@71tr6

Description

@71tr6

Is there any way to control the acceleration better?
Here is my test code:
`

#include <ContinuousStepper.h>
int rpm = 600; //Set rpm
int sps = rpm*1600/60; //Steps per Second

ContinuousStepper<StepperDriver> stepper;

void setup() {
  stepper.setAcceleration(100);
  stepper.begin(11, 12); //step pin, dir pin
  stepper.spin(sps); // rotate at X steps per seconds
}

void loop() {
  stepper.loop(); // this function must be called as frequently as possible
}

`
Without the setAcceleration line, the motor accelerates up to 400 rpm rather slowly, then stays there for a bit, then accelerates very rapidly up to 600 rpm.
With the setAcceleration line, it accelerates up to 400 rpm VERY slowly, stays there for a bit, then accelerates to 600 very rapidly.
I'd like to see the acceleration be quicker right from the start and stay linear.
Any chance this can be made to happen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions