alpeace89 wrote:joan wrote:Personally I'd go for the most inexpensive you can find initially. E.g. I have a couple of these
http://www.ebay.co.uk/itm/200964675895. The advantage of that sort of model is it's very difficult to wire it incorrectly.
I'm particularly interested in this because its so cheap! Do you now where I could get circuit diagrams for this? Or other information about approaching it this way.
Cheers, Alex
As Ravenous says these motor drivers (at least the sort us hobbyists buy) all work in pretty much the same way.
You connect the two wires from one motor to the driver Motor-A terminals.
You connect two gpios of your choice, say gpios 23 and 24, to driver A-1A, A-1B.
Connect Pi ground to driver ground.
Connect Pi 5V pin to driver VCC.
(If your motor needs more than 5V or more current than the Pi can supply connect your power source -ve to driver ground, power source +ve to driver VCC. Also connect power source -ve to Pi ground).
Set gpio 23 low gpio 24 low, motor stops.
Set gpio 23 low gpio 24 high, motor goes in one direction.
Set gpio 23 high gpio 24 low, motor goes in the other direction.
Set gpio 23 high gpio 24 high, motor stops.
Similarly for a second motor.