Arduino Motor Shield is mixing Channel A and Channel B

Hi there, I have just bought an Arduino Motor Shield. I created a simple application to test it. I connected two small motors (Channel A and Channel B) but only sent information to Channel B with the following code

void setup() {
  pinMode(13, OUTPUT);
  pinMode(8, OUTPUT);

void loop(){
  //forward @ full speed
  digitalWrite(13, HIGH);
  digitalWrite(8, LOW);
  analogWrite(11, 255);

  digitalWrite(8, HIGH);

  //backward @ half speed
  digitalWrite(13, LOW); //Establishes backward direction of Channel B
  digitalWrite(8, LOW);   //Disengage the Brake for Channel B
  analogWrite(11, 123);   //Spins the motor on Channel B at half speed

  digitalWrite(8, HIGH);

The motor B started moving properly, following the instructions. However... despite of the fact I am sending information only to Channel B, the motor plugged into Channel A started making small moves.

Just in case there was a problems with my motors, I unplugged them and I started making tests without them, just taking a look at Channel A and Channel B leds. It happened again... Despite of the fact I was sending orders to Channel B sometimes (without a pattern) Channel A leds started blinking.

I also tried without an external power source. Just with the USB it happened again.

Do am I doing something wrong? Is there a problem with my Arduino Motor Shield?

Thank you very much in advance.

Your code comments say you are sending speed control commands for Motor A:

analogWrite(11, 255); analogWrite(11, 123); //Spins the motor on Channel A at half speed

So wouldn't you expect it to move?

Does the shield use 3 pins per motor? Enable, speed, direction?

Put some code in to control the all 6 signals so you know what is doing what. Undeclared pins are reset to inputs, and when undriven may float to levels that are seen as valid high/low by other device and be acted upon accordingly.

Thank you very much for your response!

There is a mistake in my comments: It should say "Channel B" Instead of Channel A. (I have already changed it in my first post).

Yes, Arduino Motor Shield uses three pins per Channel: Direction (Digital), Speed (PWM) and Brake (Digital).

I have followed your advise. I declared the 6 pins (3 for Channel A and 3 for Channel B) and sent instructions only to Channel B (Hoping Channel A leds do not start blinking). It seemed to work but after a while it happened again... the motor I connected to Channel A started moving :(

Hi Crossroads: You were right!!!

I suppose I did not test it properly before I wrote my last post (I do not know what I did wrong... Maybe I declared the pins and I forgot to upload the code to my Arduino).

The thing is that after declared the 6 pins everything is working fine! (I have been testing it for a while)... So, thank you very, very much!

Cool. Glad you got it working.