Arduino + AdaFruit Motor Shield 2.3 + bluetooth power issue?

Hello Team,
I am building the robot that runs with 4DC motors and i have small issues when attach the bluetooth to it.
Here is quick run down of items i am using:

  1. Arduino Uno - also t ested with Arduino Mega
  2. Adafruid Motor Shiled 2.3
  3. Bluetooth HC-06
  4. 4 DC motors 6v
  5. Android app: https://play.google.com/store/apps/details?id=braulio.calle.bluetoothRCcontroller&hl=en

Now When i run the test code for these motors without bluetooth, motors are running with full strength, no issues. Here is the test code for the motors only:

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();

// Select which 'port' M1, M2, M3 or M4.
Adafruit_DCMotor *M1 = AFMS.getMotor(1);
Adafruit_DCMotor *M2 = AFMS.getMotor(2);
Adafruit_DCMotor *M3 = AFMS.getMotor(3);
Adafruit_DCMotor *M4 = AFMS.getMotor(4);

void setup() {

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  // turn on motor

  M1->setSpeed(255);
  M2->setSpeed(255);
  M3->setSpeed(255);
  M4->setSpeed(255);
  M1->run(RELEASE);
  M2->run(RELEASE);
  M3->run(RELEASE);
  M4->run(RELEASE);

  Serial.begin(9600);           // set up Serial library at 9600 bps
}

void loop()
{
M1->run(FORWARD);
M2->run(FORWARD);
M3->run(FORWARD);
M4->run(FORWARD);
delay (5000);

M1->run(BACKWARD);
M2->run(BACKWARD);
M3->run(BACKWARD);
M4->run(BACKWARD);
delay (5000);
}

When i attach the bluetooth and run the code below the motors are running with such low torque that barely can move the robot.

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();

// Select which 'port' M1, M2, M3 or M4.
Adafruit_DCMotor *M1 = AFMS.getMotor(1);
Adafruit_DCMotor *M2 = AFMS.getMotor(2);
Adafruit_DCMotor *M3 = AFMS.getMotor(3);
Adafruit_DCMotor *M4 = AFMS.getMotor(4);

const int BTState = 11;
int state;

void setup() {

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
  // turn on motor

  M1->setSpeed(255);
  M2->setSpeed(255);
  M3->setSpeed(255);
  M4->setSpeed(255);
  M1->run(RELEASE);
  M2->run(RELEASE);
  M3->run(RELEASE);
  M4->run(RELEASE);

  pinMode(BTState, INPUT);
  Serial.begin(9600);           // set up Serial library at 9600 bps
}

void loop()
{
  //Stop car when connection lost or bluetooth disconnected
  if (digitalRead(BTState) == LOW) {
    state = 'S';
  }

  //Save income data to variable 'state'
  if (Serial.available() > 0) {
    state = Serial.read();
  }

  //If state is equal with letter 'F', car will go forward!
  if (state == 'F') {

    M1->run(FORWARD);
    M2->run(FORWARD);
    M3->run(FORWARD);
    M4->run(FORWARD);
  }


  //If state is equal with letter 'B', car will go backward
  else if (state == 'B') {

    M1->run(BACKWARD);
    M2->run(BACKWARD);
    M3->run(BACKWARD);
    M4->run(BACKWARD);
  }

  //If state is equal with letter 'S', stop the car
  else if (state == 'S') {
    M1->run(RELEASE);
    M2->run(RELEASE);
    M3->run(RELEASE);
    M4->run(RELEASE);
  }
}

I have connected everything correctly when comes to bluetooth but i do not understand why when i initiate Forward or Backward command from my phone or computer via bluetooth i am not getting full speed of the DC motors. it almost seems that i am not getting enough power to them.

Any idea what am i doing wrong?

Any one has any ideas how to troubleshoot this?

Ok i figure it out what the issue is.
It is in this part of the code:

//If state is equal with letter 'S', stop the car
  else if (state == 'S') {
    M1->run(RELEASE);
    M2->run(RELEASE);
    M3->run(RELEASE);
    M4->run(RELEASE);
  }

So the app i have is streaming the data every 50ms over Bluetooth. So in between those moments Bluetooth is executing the code above. So what i need to add is statement that if the State of the Bluetooth is "S" is greater let say than 1s than execute that code above. The "S" state means no button on app are pressed and it means stop the robot.
Can you help me write that line of code that will say if the S state is greater than 1s than execute that else if statement?

Thanks,
Slav