I'm sure that this is covered somewhere in the conversation above, but it wasn't too clear for us - So we thought we should post in some detail what worked for us.
My son and I just did a similar project this evening (SparkFun "Magician" Chassis (http://www.sparkfun.com/products/10825
) + SparkFun TB6612FNG Breakout (http://www.sparkfun.com/products/9457
) + Netduino).
We wired it like so:
Netduino to TB6612FNG
DIO0 = Standby (This needs to be high (true))
DIO1 = AIN1
DIO2 = AIN2
DIO5 = PWMA
DIO6 = PWMB
DIO8 = BIN1
DIO9 = BIN2
VM = Motor power +
VCC = 5 volt on Netduino
AO1 = Red motor lead (Right)
AO2 = Black motor lead (Right)
BO2 = Black motor lead (Left)
BO1 = Red motor lead (Left)
(Its left/right when the front is the end with the wheels)
We connected all grounds (Netduino, motor power, TB6612FNG) together.
We started with ajcg1973's code (thanks!) from here: http://forums.netdui...tduino-tankbot/
Here's an example using his code with our pin selections.
OutputPort stby = new OutputPort(Pins.GPIO_PIN_D0, true);
AjbMotorTB6612FNG motors = new AjbMotorTB6612FNG(Pins.GPIO_PIN_D5, Pins.GPIO_PIN_D1, Pins.GPIO_PIN_D2, Pins.GPIO_PIN_D6, Pins.GPIO_PIN_D8, Pins.GPIO_PIN_D9);
motors.Motor1Direction = AjbMotorTB6612FNG.MotorDirection.Forward;
motors.Motor1Speed = 100; // Set the motor to 100% speed
motors.Motor2Direction = AjbMotorTB6612FNG.MotorDirection.Reverse;
motors.Motor2Speed = 100; // Set the motor to 100% speed
Set like this, "A" will be motor1 and "B" will be motor2.
The motors on this chassis don't respond at 10%. 20% seems around the bottom.
We flipped "forward" and "reverse" from how it's set in ajcg1973's code (We might be driving backwards (round end front?) - but the ball seems to follow better then lead.).
This will race around in a tight circle. Keep this in mind if your debug USB is still connected.
If you are using this motor driver - this PDF is useful: http://www.pololu.co...df?file_id=0J86
This is what worked for us - and nothing caught on fire, but YMMV.
We hope this helps someone else.