SeveralThingsAtTheSameTimeRev1. In theory, the program will never drive a motor into a switch, but since I am writing each program from scratch, if I mistype or measure a distance incorrectly, a motor will run to far and hit a switch, and probably damage some parts, and at that point, I want it to stop everything. First Arduino project : Leds stripes with 2 loops running at a time. However, it is your assignment and we should not be doing it for you. I can think of multiple ways to implement it using one or more while loops. I have three limit switches for three different motors. If you MUST use while loop (s) you will need to read the button each iteration through the while loop (s) in order to count the pushes. If the condition is never false, the program will be stuck in the loop and will not be. I have a program where I am asking several stepper motors to run and perform various actions (like a CNC machine). A while loop will continuously loop until its condition turns false.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |