Attach the wiring from the BBB while it is unplugged and there is no power going to the BBB to the L298 motor driver from Open-Electronics.org.
One of the four wires controls the on/off functionality (En A or En B). Then, the other wires, one ground, control forward and backwards capabilities. Attach your other wiring, the wiring for forward/backward, to ln1 and ln2. The En B and ln 3 and ln 4 are for the second motor.
Go to beagleboard.org/latest-images. Grab your image, i.e. preferably the newest available. If your pins are configured for other uses outside of GPIO functionality, use config-pin gpio for each pin that is used.
If this software only goes forward, stops, and shuts down, let me know. If that is too boring, look below. This software will control initialize, start forward, stop, reverse, and stop, and then shuts down and closes the software as it completes.
import Adafruit_BBIO.GPIO as GPIO
Master_Pin = "P9_21"
ln1 = "P9_22"
ln2 = "P9_12"if __name__=="__main__":
print"I love your body Larry!"
If you are wondering about the schematic of this particular motor driver, see the photos section or see here now:
See the L298N, dual H-bridge section for pin connections that need to be made.
P.S. Use a 12v battery if available. The motors can handle 2A maximum each forward and backwards. The L298 board can handle 5 to 30V DC.