Mecanum Rover 2.0 Back Left motor problem

I am having problem with the back Left motor (All other 3 work). It only spin in one direction.

I took the Motor Shied (RB-Dfr-151) of the car and put it on a Arduino uno and it work good. So I think the problem is with the Rover Robot Controller broad (RB-Dfr-130) or Arduino SDK.

I am using Arduino 1.0.1 SDK to program (Board -> Arduino Uno). The car is using Arduino Mega ADK driver from the drive folder.

Motor Shield info:
L2898p-Twin v1.1 DFROBOT
E1 = 10
M1 = 12
E2 = 11
M3 = 13

My code:

[code]//Rear motors
int E1 = 10; //M1 Speed Control
int E2 = 11; //M2 Speed Control
int M1 = 12; //M1 Direction Control //Right
int M2 = 13; //M2 Direction Control //Left

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

void setup()
{
int i;
for(i=5;i<=8;i++)
pinMode(i, OUTPUT);
Serial.begin(9600);
}

void loop()
{
//int leftspeed = 255; //255 is maximum speed
//int rightspeed = 255;
//analogWrite (E1,255);
//digitalWrite(M1,HIGH);
//analogWrite (E2,255);
//digitalWrite(M2,LOW);

analogWrite (E1,255);
digitalWrite(M1,HIGH);
analogWrite (E2,255);
digitalWrite(M2,HIGH);
delay(5000);

analogWrite (E1,255);
digitalWrite(M1,LOW);
analogWrite (E2,255);
digitalWrite(M2,LOW);
delay(5000);

} [/code]

Thanks,

Shazad

I did a led blink test on pin 13 it fail will not blink at all. I know pin 10 work because I can control speed. So i think it the Arduino on the car is the problem. I swap the motor and it the same problem what every connect to m2 only spin in one direction.

I don’t know why it load the Arduino Mega ADK (but it did in both xp and windows 7). When I plug it in the computer I show up as Arduino Mega ADK and i point it to the driver folder for the Arduino SDK it install it.

Should I RMA the Rover Arduino Board?

From what you said, you tried the shield on a normal Arduino Uno and you were able to get both motors working in both directions. Can you check that the pins 10 to 13 are working correctly? If you swap the motors, do you get the same results (to check that it’s not a motor issue)?

The result seems like either the M1 or M2 pins are not connected properly (which would explain why it’s only rotating in one direction), but since you tested it successfully on an Uno, that does not seem to be the solution.

Why?

Some DFRobotShop rover units have the ADK identifier in the serial-to-USB chip. This does not affect their functionality though and they still operate as Arduino Uno. We apologize for the confusion.

If Pin 13 is not able to blink an LED, it probably means it is burnt. Please contact us at our Support Centre with a brief description of your problem, a link to this thread and your order number so we can offer you an RMA.