This program oscillates the motor clockwise and counterclockwise five times. It turns clockwise for half a second and then counterclockwise until the standoff trips the limit switch. At the beginning the motor turn counterclockwise until it hits the limit switch. This is to prevent the standoff from hitting and bending the limit switch from behind.
The purpose of this unit was to understand the basics of programming, open and closed loop systems, if/then statements, and while and for loops.
I learned to keep code organised and commented (something I've been awful about in the past) and how to use for loops. I also learned about the format of C.
I learned to keep code organised and commented (something I've been awful about in the past) and how to use for loops. I also learned about the format of C.