I am very new to programming. I got my stepper motor driver to drive my stepper motor with my arduino thanks to some example code from another member that I altered to work for my setup. Thanks so much for that.
I now need to be able to make the motor turn until a micro switch is triggered. I think this should be fairly simple, but I have only just started learning. Can anyone assist please? Thank you in advance for any help.
We can't help you with code we can't see.
Create a loop, taking a single step every time, until the switch is triggered.
while (digitalRead(switch) == HIGH) {
// move stepper one more step
}
This assuming switch is active low, this depends on your wiring.
thank you. I will play with this and see if I can make it work.