Greetings.
I need help properly declaring a stepper object, specifically defining new pins, or mapping pins to a port.
I have an Arduino Mega 2560 and an older Adafruit v 1.2 motor shield and am attempting to drive two four wire bipolar stepper motors.
I am using the DFRobot multi expansion shield Mega_Multi-Expansion_shield_SKU_DFR0256-DFRobot so I can simply plug shields into individual headers.
Naive question: These are four wire motors but I am only using two pins to drive the latch? How do I declare the motor:
For my layout I would have expected:
#define STEPPER1_DIR_PIN 51
#define STEPPER1_STEP_PIN 2
#define STEPPER2_DIR_PIN 4
#define STEPPER2_STEP_PIN 3
// note that the DFRrobot expansion board requires me to carefully map digital pins from the Mega to one of four individual header panels.
AccelStepper azimuthMotor(AccelStepper::DRIVER, STEPPER1_STEP_PIN, STEPPER1_DIR_PIN);
AccelStepper elevationMotor(AccelStepper::DRIVER, STEPPER2_STEP_PIN, STEPPER2_DIR_PIN);
Since this is a FULL4WIRE motor am I declaring it correctly?
Motors don't budge and I am trapped in a local minimum?
I would be content using the examples perhaps if I could simply remap pins to ports?
Regards
Todd