yep, just replace the AFMotor stuff, and the existing AccelStepper declarations with the versions from the _polarshield variant:
AccelStepper motorA(1,MOTOR_A_STEP_PIN, MOTOR_A_DIR_PIN);
AccelStepper motorB(1,MOTOR_B_STEP_PIN, MOTOR_B_DIR_PIN);
https://github.com/euphy/polargraph_server_polarshield/blob/master/configuration.ino#L99-L100
and
pinMode(MOTOR_A_ENABLE_PIN, OUTPUT);
digitalWrite(MOTOR_A_ENABLE_PIN, HIGH);
pinMode(MOTOR_B_ENABLE_PIN, OUTPUT);
digitalWrite(MOTOR_B_ENABLE_PIN, HIGH);
motorA.setEnablePin(MOTOR_A_ENABLE_PIN);
motorA.setPinsInverted(false, false, true);
motorB.setEnablePin(MOTOR_B_ENABLE_PIN);
motorB.setPinsInverted(true, false, true);
https://github.com/euphy/polargraph_server_polarshield/blob/master/configuration.ino#L122-L129
|