So I searched a lot on the internet about how to move a stepper by steps like a servo.
I am trying to build a robotic arm with two steppers, but to do that I need to make it move a certain amount of steps.
Here is my code to make it the two steppers move back and forth:
The university of new orleans robotics club has a guide of motion workshops that may be able to help: https://unorobotics.herokuapp.com/resources. They use "bit-banging" with specific registers.
here's some pseudocode that uses digitalWrite() that may help as well:
const int MOTOR = 8; //whatever pin number step is connected to
const int STEPS = 5000; //number of steps you want to move
for (int i =0; i < STEPS; i++) {
digitalWrite(MOTOR, HIGH);
delayMicroseconds(1000); //change this delay to change the speed of the motor
digitalWrite(MOTOR, LOW); //you may have to adjust the step mode. this code assumes 1/4 step
}
You may also have a problem that your driver does not have a 5V threshold voltage. Check the data sheet to see if you can trigger it with an arduino.