...
The setup can be seen in the figure below. Firstly, the positive and negative terminals of the motor were attached to the OUT1 and OUT2 terminals of the motor driver. The 9V battery was connected to the 12V terminal of the motor driver and the 5V terminals of both the motor driver and Arduino were connected to supply power to all of the components. The ENA, IN1, and IN2 terminals of the driver were connected to the ~9, ~10, and ~11 pins of the Arduino, allowing for control of the direction and speed of the motor. The other terminals (ENB, IN3, IN4, OUT3, OUT4) were left unused as only one motor was needed to run the entire mechanism. The potentiometer was provided an input voltage through the Vin terminal of the Arduino and the output was run to the A0 pin of the Arduino. Finally, all of the ground terminals were connected by black wire as seen below. The initial design of the electronic system can be seen in the Appendix as well.