Since I have prior experience with programming and an Arduino, as well as experience with servo motors, I decided to use both in my mechanism. I did not take into account the fact that servo motors can only rotate between 0 and 180 degrees when designing my mechanism. I wrote the code so that my servo motor would rotate 180 degrees from 90 degrees to -90 degrees. This had little effect on the motion for my mechanism but the sliders slider's hole that I created was a bit longer than needed, do due to the limited motion. Figure 1 shows the connection used to power my motor, while Figure 2 shows the code to control the motor's rotation.
...