Hello, World!
First post -- Do correct me if I say anything stupid
I am using a RAMPS V1.4 shield -
LinkHardware:
Arduino Mega 2650
RAMPS V1.4 Shield
Connected on the shield, in the area labeled "X," is a A4988 stepper driver. Connected above that, of course, is a 4-pin 200 step stepper motor.
As you can see by
This image, pins A0(D54), A1(D55), D2, D3, and D38 are all associated with this stepper driver. This seems correct, as I have seen many people use these same pins for X-axis motors in their firmware. Two of them, X-MAX and X-MIN, might not even relate to the stepper. This leaves 3 pins, which still doesn't help much.
My question is -- In what order do these appear in firmware? After ~4 hours of research, I have come up empty handed. Many of the forums related to the Stepper.h library simply refers to the arguments needed in the constructor as
pin 1, pin 2, pin 3, pin 4, <pin 5> -- and I don't know which ones it's referencing! I could try every combination of all of those pins, but that can easily cause damage.
So I have my pins - I have my hardware. Now I just need to know in which order the pins go.
So I have, at the moment, this very raw test code. Marked with ?? is where confusion is struck.
#include <Stepper.h>
Stepper xAxis(200, ??);
void setup(){
xAxis.setSpeed(60);
}
void loop(){
xAxis.step(10);
}
So, very simple code to rotate the stepper at 60 rpm.
So far, I have been able to make the stepper motors vibrate. This is what caused me to realize that trying all possible combinations was going to make something catch fire
