I want to create a program that runs a motor triggered my motion from a PIR motion sensor. I've already gotten my motion sensor working, but I'm having trouble figuring out how to build the circuit for the motor. When I looked online, most of the responses assumed that the motor was to be spinning in both directions; however, I only need my motor to spin in one direction, so I don't think I need the L293D chip or any other motor controller.
I thought this would simplify the process significantly, but I can't seem to build the circuit. The motor uses a 6*1.5V battery pack which I have taken out, and the pack has a positive and negative wire. I was thinking that the circuit would go from the battery pack to the motor to a GPIO pin and back to the negative end of the battery pack. What I was worried about is if I need to connect any wire back to a GND pin on the Pi.
All help would be greatly appreciated and please contact me if I lacked clarity anywhere in my post.
Thank you very much