150
« on: January 27, 2022, 07:24:05 PM »
After looking further into the code and previous revisions of the board, and being admittedly confused for a bit, I have a solution for you! So there are two main points.
1. Rev3 boards have the silkscreen swapped around, so Motor 1 is 2, and Motor 2 is 1. This is a little confusing, but you could make a more readable code fix using:
int motor1 = 2;
int motor2 = 1;
or you could directly change the pins in stepper.ino:
const int stepPin1 = 45; // this fix only works when using stepper motors, dc motors would require a different fix
const int dirPin1 = 30;
const int stepPin2 = 44;
const int dirPin2 = 27;
2. Both motors must be enabled for either to work and in this same vein of thought - you must send commands to both motors as well. You can set the 2nd motor speed to 0, but you do need to send something for motor 1 to move. These extra commands sending the stepSpeed to the second motor won't use any noticeable amount of power.
I hope that helps! We need to update our stepper.ino library and add some documentation on both of these points, so thank you for bringing this issue to our attentions.
Cheers,
Réna