Mecanum motor wire connections

Hi,

I am unclear where to attach each of the two wires coming from the 4 motors. The sample code leads me to think they should be attached to digital posts on the included motor shield? A picture would be great. Struggling, thanks!

Sketch #3: V2.0 Mecanum – Basic Directions
/* To control the Rover, copy and paste the code below into the Arduino software. Ensure the motors are connected to the correct pins. The code does not factor in encoders at this time*/
//Front motors
int E1 = 3; //M1 Speed Control
int E2 = 11; //M2 Speed Control
int M1 = 12; //M1 Direction Control
int M2 = 13; //M2 Direction Control

//Rear motors
int E3 = 6; //M1
int E4 = 5; //M2
int M3 = 8; //M1
int M4 = 7; //M2

This is a portion of the sketch and seems to indicate that the motors should be connected to the digital ports on the motor shield? Do you have a picture of a completed rover so that I can see the wire connections?

Connect the front right motor to the screw terminals on the middle right of the PCB
Connect the front left motor to the screw terminals on the middle left of the PCB
Connect the rear left motor to the screw terminals at the rear of the shield marked M2
Connect the rear right motor to the screw terminals at the rear of the shield marked M1

Hope this helps,

Ah, my sincere apologies; You are correct that Sketch #3 is for the Mecaum Rover. Note that you need to send commands via USB or other wireless device (It won’t do anything on its own). The shield is labeled, so you need only connect each motor as indicated:

//Front motors
int E1 = 3; //M1 Speed Control
int E2 = 11; //M2 Speed Control
int M1 = 12; //M1 Direction Control
int M2 = 13; //M2 Direction Control

//Rear motors
int E3 = 6; //M1 Speed Control
int E4 = 5; //M2 Speed Control
int M3 = 8; //M1 Direction Control
int M4 = 7; //M2 Direction Control

Assembly video: youtube.com/watch?v=UEIFHebyM5s

That sample code is for the full speed forward test on the tank (two motor) basic rover. You can simply add code to create a full speed test for the Mecanum setup, or try the WASD code (which indicates which pins connect to where on the board).

There is one dual motor controllers on the DFRobotShop Rover PCB, and there is another on the shield. We suggest plugging the two “front” motors to the one on the DFRobotShop Rover PCB and the two rear motors to the shield (mainly for aesthetics). When you test the motor code, if a motor spins the wrong way, simply reverse those two wires. We hope to see your progress!

This video does not show anything about how to wire the rover