Guys -
Thanks for all your wiring tips. After much troubleshooting, I found that there were some cold solder joints on the batter pack, which I fixed and the unit lit up when I turned on the power. Yay.
Now, I did tap each of the 4 enables on the VCC and each motor went a different direction based on which enable. So check, the DC Motor controller works.
However, I have tried now to control when each motor fires with GPIO. As there are 4 Enables I connected to GPIO pins 12,16, 23, and 24, respectively.
I've tried a couple of different routines, and nothing seems to fire the enables.
Here is what I've tried:
Code: Select all
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BOARD)
Motor1A = 16
Motor1B = 23
GPIO.setup(Motor1A,GPIO.OUT)
GPIO.setup(Motor1B,GPIO.OUT)
print "Turning motor on"
GPIO.output(Motor1A,GPIO.HIGH)
GPIO.output(Motor1B,GPIO.LOW)
sleep(2)
print "Stopping motor"
GPIO.cleanup()
Does this look like it should start? Any coding suggestions would be greatly appreciated!
Thanks again!