I am pretty new, and self taught. I'm trying to get a stepper motor to move an object through a photo interrupter multiple times, then stop at a certain count. I don't have a copy of the code to show, as I am currently working on it, and it's a mess. The motor is working, and the sensor is working, but not together. Any help is greatly appreciated.
For help, please read and follow the instructions in the "How to get the best out of this forum" post.
They will only work together if the openings in the photo interrupter correspond to the steps of the stepper motor. Then one must ask, what is the real purpose of the photo interrupter'?
@Paul_KD7HB Thank you for responding. I'm basically trying to get a wheel to spin say 10 times, then stop at a specific point. I've only ever used Arduino to operate LEDs, or small motors and servos, but not with sensors.
Stepper motors,by design, make individual, controlled, steps, which can be counted by the controlling software. When the step count shows the wheel has spin 10 times, then do whatever needs to be done. No sensor needed!
@Paul_KD7HB Thank you so much!!! I did not consider that. Being new, I was over thinking it. Thank you again.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.