AccelStepperSpark library change pins

I am trying to change the defaults pins of the AccelStepperSpark library but I am unable to edit the AccelStepper.h file after using the ProportionalControl example
Need to use D0,D1,D3,D4

Any help is appreciated.

The class features a constructor that takes the desired pins as parameters.
For convenience these parameters are preset with default pins but you can simply override them.

 AccelStepper(uint8_t interface = AccelStepper::FULL4WIRE, uint8_t pin1 = D2, uint8_t pin2 = D3, uint8_t pin3 = D4, uint8_t pin4 = D5, bool enable = true);

This sample even illustrates how to set custom pins

BTW, D0 & D1 are no default pins but D2 &D5 is.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.