#include <AccelStepper.h>
const int STEP_1 = 5;
const int DIR_1 = 4;
const int STEP_2 = 3;
const int DIR_2 = 2;
const int M1_MS0 = 7;
const int M2_MS0 = 6;
AccelStepper M1(1, STEP_1, DIR_1);
AccelStepper M2(1, STEP_2, DIR_2);
void setup() {
// put your setup code here, to run once:
pinMode(M1_MS0, OUTPUT);
pinMode(M2_MS0, OUTPUT);
M1.setMaxSpeed(100);
M2.setMaxSpeed(100);
digitalWrite(M1_MS0, LOW);
digitalWrite(M2_MS0, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
M1.setSpeed(26);
M2.setSpeed(53);
M1.run();
M2.run();
}