Hello,
I made a mistake with wiring and soldering my motor driver to pins 8,9,10,11.... I was looking at an old electrical drawing... the accelstepper default pin locations are 2,3,4,5... is there any way to advoid redoing the soldering on the shield and just changing the default pin set up in the code?
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
AccelStepper stepper(AccelStepper::FULL4WIRE, 8, 9, 10, 11);| AccelStepper::AccelStepper | ( | uint8_t | interface = AccelStepper::FULL4WIRE, |
| uint8_t | pin1 = 8, | ||
| uint8_t | pin2 = 9, | ||
| uint8_t | pin3 = 10, | ||
| uint8_t | pin4 = 11, | ||
| bool | enable = true | ||
| ) |
#include <AccelStepper.h>
// Define a stepper and the pins it will useAccelStepper stepper(AccelStepper::FULL4WIRE, 8, 9, 10, 11);
void setup(){ stepper.setMaxSpeed(100); stepper.setAcceleration(100); stepper.moveTo(200);}
void loop(){ if (stepper.distanceToGo() == 0) { stepper.moveTo(-stepper.currentPosition()); } stepper.run();}