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

Is there a bug in AccelStepper::step4? #2

Open
yippieyaray opened this issue Apr 14, 2018 · 1 comment
Open

Is there a bug in AccelStepper::step4? #2

yippieyaray opened this issue Apr 14, 2018 · 1 comment

Comments

@yippieyaray
Copy link

Hi,

as far as I know is in a 4 phase full step mode, the value for the sequence zero 0b1010 and for sequence two 0b0101. You can find this sequences in lots of stepper theroy books too.

In AccelStepper.cpp I found the values in the comments but the coding differs.

void AccelStepper::step4(long step)
{
...
case 0: // 1010
setOutputPins(0b0101); <--- 0b1010
break;
...
case 2: //0101
setOutputPins(0b1010); <--- 0b0101
break;
...

Regards,
Ray

@waspinator
Copy link
Owner

Thanks for reporting the issue. The comments don't match up with the code, but the affect of switching those two values would only flip the definitions of "forward" and "backward".

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

2 participants