3 pin half step function

13 views
Skip to first unread message

Richard Hulme

unread,
Jan 20, 2026, 5:16:50 AM (14 days ago) Jan 20
to accelstepper
When using 3 wire Half Step, you cannot moveTo a negative value. This is caused by the following in the cpp file:

void AccelStepper::step6(long step)
{
    switch (step % 6)

Change it to this to allow normal operation:

     void AccelStepper::step6(long step)
int s = step % 6;
    if (s < 0) s += 6;   // normalize negative remainder

    switch (s)

It worked for me but glad to be corrected if cause other issues..

Mike McCauley

unread,
Jan 20, 2026, 5:13:47 PM (13 days ago) Jan 20
to accelstepper, Richard Hulme

Thanks for reporting this.

New version 1.66 now uploaded.


Cheers.

--

Mike McCauley           VK4AMM                   mi...@airspayce.com

Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia  

http://www.airspayce.com                                 5R3MRFM2+X6

Phone +61 7 5598-7474


Reply all
Reply to author
Forward
0 new messages