[HELP] Remote Control

Hi,
I’m doing the first Arduino project, a small 3-wheel car with remote control by Bluetooth.
I’ve finished my code and my circuit but my car doesn’t work.
I don’t know what problem I met
I need a help.
Here are my code, my circuit and my app on mobile.

#define inA1 6
#define inA2 7
#define inB1 8
#define inB2 9

char state;

void setup() {
  Serial.begin(9600);
 
  pinMode(inA1, OUTPUT);
  pinMode(inA2, OUTPUT);
  pinMode(inB1, OUTPUT);
  pinMode(inB2, OUTPUT);
  
}

void loop() {
   if(Serial.available() > 0)
 {
   state = Serial.read();
 } else 
   state = 0;
 
 Serial.println(state);
 switch (state){
  case '0': //Stop
  motor(inA1, inA2, 0);
  motor(inB1, inB2, 0);
  break;
 case '1': //Ahead
  motor(inA1, inA2, 1);
  motor(inB1, inB2, 1); 
  break;
  
  case '2': //Back
  motor(inA1, inA2, 2);
  motor(inB1, inB2, 2);
  break;
   case '3': //Left
  motor(inA1, inA2, 1);
  motor(inB1, inB2, 0);
  break;
   case '4': //Right
  motor(inA1, inA2, 0);
  motor(inB1, inB2, 1);
  break;
 }
 
  
}
void motor(byte in1,byte in2,byte direct)
{
  switch(direct)
  {
    case 0:       //Stay
      digitalWrite(in1, LOW);
      digitalWrite(in2, LOW);
      break;
    case 1:       //Rotate 1
      digitalWrite(in1, HIGH);
      digitalWrite(in2, LOW);
      break;
    case 2:       //Rotate 2
      digitalWrite(in1, LOW);
      digitalWrite(in2, HIGH);
      break;
  }
}

You should use a separate power supply (up to 12V depending on your motor voltage) connected to the motor driver board.

Your code does not initialize the BT module - do you use Serial Monitor to control your motors?

I’d suggest to use the H-bridge examples first, to find out whether your circuit works at all. Then add the BT module and make it work, again using the related code examples. Finally merge both sketches.

DrDiettrich:
You should use a separate power supply (up to 12V depending on your motor voltage) connected to the motor driver board.

Exactly what you say, that's because of power supply. I've tried with a separate power supply and my car has worked.
Thanks for your suggestion!