I’ve been working on a project for a few weeks now with the help of a programmer and we are totally stumped. We have almost everything working except for two things. The project is a camera slider controlled via an arduino. I am using a stepper motor, an arduino pro Mini 5v, a potentiometer, a 2 way toggle switch, and a 3 way toggle switch along with two limit switches. The issue is with the 2 way toggle switch and the limit switches.
The 2 way toggle switch selects a set of speeds, pretty much a low speed and high speed this way I can control the set using the potentiometer. The 3 way toggle picks the drive mode, straight or looped (middle position is no movement) in Straight mode EVERYTHING works. Speed selector toggle works great, when the carriage hits an end stop the motor stops until the potentiometer is turned.
In loop mode we have issues, the 2 way toggle switch (speed selector) is doing nothing, I cannot pick the lower set of speeds to use. Also, when it is currently set to the slowest via the potentiometer when it hits an end stop instead of reversing direction it simply locks up. I also have no clue if the person who was programming this did things in a more complicated way then what was necessary.
Attached is the wiring diagram he provided as well as the code its self. Any help would be great
combined_5.ino (10.4 KB)