Breadboard view of a potentiometer connected to analog in 0 of the Arduino. A transistor is connected to Digital Pin 9. A DC motor connects to the transistor and a DC jack. The DC jack connects its red wire to the first wire of the DC motor. The other wire of the DC jack connects to ground. The second wire of the DC motor connects to the collector of the transistor. A Power Diode with the Cathode connected to the collector of the transistor and anode connected to ground