I’ve attached a photo of the wiring. The motor only has to spin one way for a short period of time. The circuit works when powered by AAs but they weren’t making the motor spin fast enough to launch the rack in a rack and pinion mechanism. However, with the 9v battery, the motor pulses when it should be written low. and doesn’t seem to increase the speed of the motor when it’s written high.