(My code was a lot worse before, but I got a lot of help from reddit :P) Serial.println(" Type 1 to move the cube into position and type 2 to move the cube out of position.") here is where the stepper motor code goes (I drew a picture because that description wasn't too great) #define switchA 13 As soon as the limit switch is open again, the motor will run fine. When one of the limit switches is pressed and the user tells the motor to run in the opposite direction to move the cube away, the motor vibrates and doesn't run well. Both limit switches work and will stop the motor when they are pressed, but I ran into a problem. The motor rotates a screw which pushes the prism down the track, and I wired up two limit switches and plan to place them at either end of the track so that the prism stops in the same place every time. My goal is to have a prism be movable along a track remotely. I have been working for a couple of weeks on a project, and I'm at a point where I need some guidance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |