Hi all, my stepper stopped working all of a sudden. About a week ago, I was able to upload my Arduino code below and control the stepper motor. Today when I ran the code it throws me this message:
"Sketch uses 798 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes."
It seems like the Arduino Board is picking up the code. But for some reason isn't relaying it to the stepper motor.
const int dirPin = 2;
const int stepPin = 3;
const int stepsPerRevolution = 200;
void setup() {
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
digitalWrite(dirPin, LOW);
//Spin motor slowly
for(int x = 0; x < stepsPerRevolution; x++){
digitalWrite(stepPin, HIGH);
delayMicroseconds(2000);
digitalWrite(stepPin, LOW);
delayMicroseconds(2000);
}
}
void loop() {
}