Motor Shield 2A and Ethernet Shield (Need help)

So I have this motor shield: http://iprototype.be/products/arduino/shields/motor-2A
and a Ethernet Shield.

This is my code:

//Arduino PWM Speed Control?
int E1 = 11;  
int M1 = 9; 
int E2 = 12;                      
int M2 = 13;                        
 
void setup() 
{ 
    pinMode(M1, OUTPUT);   
    pinMode(M2, OUTPUT); 
} 
 
void loop() 
{ 
  int value;
  for(value = 0 ; value <= 255; value+=5) 
  { 
    digitalWrite(M1,HIGH);   
    digitalWrite(M2, HIGH);       
    analogWrite(E1, value);   //PWM Speed Control
    analogWrite(E2, value);   //PWM Speed Control
    delay(30); 
  }  
}

Like this it works perfectly. When I do M1 Low and M2 High, works perfectly (turns)
But when I want to turn in the other way (M2 Low, M1 High) 2 wheels don’t turn, the two others spin very slowly. M1 and M2 Low also doesn’t work.

I know that the ethernet shield uses pin 4 So I changed to pin from the MotorShield to te pins (in the code) And forward goes perfect, and turning Weth M1 Low also but with M2 low not :frowning:
I am really desperate.

Thanks you!

Pins 11,12, and 13 are all used by Ethernet shield, not just 4 or 10. You will have to do more rewiring to move away from these 3 pins.

liudr:
Pins 11,12, and 13 are all used by Ethernet shield, not just 4 or 10. You will have to do more rewiring to move away from these 3 pins.

Just did that,I now use pin 1,9,2,3. Stil doesn't work. :confused:

TheDigitalToaster:

liudr:
Pins 11,12, and 13 are all used by Ethernet shield, not just 4 or 10. You will have to do more rewiring to move away from these 3 pins.

Just did that,I now use pin 1,9,2,3. Stil doesn’t work. :confused:

Ps. The standard pins used by the motor shield are:

int E1 = 5;  
int M1 = 4; 
int E2 = 6;                      
int M2 = 7;

Have you tried it without the E'net shield in place, just to check that the motor shield is ok?

JimboZA:
Have you tried it without the E'net shield in place, just to check that the motor shield is ok?

Yeah, works perfectly if I just put the motor shield on the Arduino :slight_smile:

Let's not use pin 1. Pin 1 is for program upload.

For your shield, do you PWM enable pin? If yes, you need to use PWM pins for E1 and E2. Which pins are you using for E1 and E2?