I would like to use MeUnoShield and 3 stepping motors.
However, stepping motor can not be used at port 2.
This is the Arduino code
#include “MeOrion.h”
#include <SoftwareSerial.h>
MeStepper stepper(PORT_1);
MeStepper stepper2(PORT_2);
void setup()
{
Serial.begin(9600);
stepper.setMaxSpeed(1000);
stepper.setAcceleration(20000);
stepper2.setMaxSpeed(1000);
stepper2.setAcceleration(20000);
}
void loop()
{
if(Serial.available())
{
char a = Serial.read();
switch(a)
{
case ‘0’:
stepper.moveTo(0);
stepper2.moveTo(0);
break;
case ‘1’:
stepper.moveTo(200);
stepper2.moveTo(200);
break;
case ‘2’:
stepper.move(50);
stepper2.move(50);
break;
case ‘3’:
stepper.move(100);
stepper2.move(100);
break;
case ‘4’:
stepper.move(200);
stepper2.move(200);
break;
}
}
stepper.run();
stepper2.run();
}
Port 1 could be used.
What should I do?