Arduino,hc 05,motor shield not working my hc-05 doesn't turn on

Good 'day

This is my first Arduino project for school and my car contains Arduino uno, hc-05 and motor shield needs to be connected to my laptop to work, I have tried many options but failed I need help if its something wrong with my code or is it hardware. to connect to the Bluetooth you have to connect it to my laptop to turn it on. same with the Arduino uno!

this is my first time making a project for school, please do help me

/*

  Arduino Bluetooth Controlled Car
  Install Adafruit Motor Shield Library before uploading this code.
  AFMotor Library https://learn.adafruit.com/adafruit-motor-shield/library-install

  -> If you need helping guide on how to install library for the motor shield or how to use motor shield then
     watch this: https://youtu.be/vooJEyco1J4

     Caution: Remove the jumper or switch off the battery switch before connecting the Arduino board to computer.

     For more support contact me on Telegram: @UtGoTech


*/


#include <AFMotor.h>
#include <SoftwareSerial.h>

SoftwareSerial bluetoothSerial(9, 10); // RX, TX

//initial motors pin
AF_DCMotor motor1(1, MOTOR12_1KHZ);
AF_DCMotor motor2(2, MOTOR12_1KHZ);
AF_DCMotor motor3(3, MOTOR34_1KHZ);
AF_DCMotor motor4(4, MOTOR34_1KHZ);

char command;

void setup()
{
  bluetoothSerial.begin(9600);  //Set the baud rate to your Bluetooth module.
}

void loop() {
  if (bluetoothSerial.available() > 0) {
    command = bluetoothSerial.read();

    Stop(); //initialize with motors stoped
    
    switch (command) {
      case 'F':
        forward();
        break;
      case 'B':
        back();
        break;
      case 'L':
        left();
        break;
      case 'R':
        right();
        break;
    }
  }
}

void forward()
{
  motor1.setSpeed(255); //Define maximum velocity
  motor1.run(FORWARD);  //rotate the motor clockwise
  motor2.setSpeed(255); //Define maximum velocity
  motor2.run(FORWARD);  //rotate the motor clockwise
  motor3.setSpeed(255); //Define maximum velocity
  motor3.run(FORWARD);  //rotate the motor clockwise
  motor4.setSpeed(255); //Define maximum velocity
  motor4.run(FORWARD);  //rotate the motor clockwise
}

void back()
{
  motor1.setSpeed(255); //Define maximum velocity
  motor1.run(BACKWARD); //rotate the motor anti-clockwise
  motor2.setSpeed(255); //Define maximum velocity
  motor2.run(BACKWARD); //rotate the motor anti-clockwise
  motor3.setSpeed(255); //Define maximum velocity
  motor3.run(BACKWARD); //rotate the motor anti-clockwise
  motor4.setSpeed(255); //Define maximum velocity
  motor4.run(BACKWARD); //rotate the motor anti-clockwise
}

void left()
{
  motor1.setSpeed(255); //Define maximum velocity
  motor1.run(BACKWARD); //rotate the motor anti-clockwise
  motor2.setSpeed(255); //Define maximum velocity
  motor2.run(BACKWARD); //rotate the motor anti-clockwise
  motor3.setSpeed(255); //Define maximum velocity
  motor3.run(FORWARD);  //rotate the motor clockwise
  motor4.setSpeed(255); //Define maximum velocity
  motor4.run(FORWARD);  //rotate the motor clockwise
}

void right()
{
  motor1.setSpeed(255); //Define maximum velocity
  motor1.run(FORWARD);  //rotate the motor clockwise
  motor2.setSpeed(255); //Define maximum velocity
  motor2.run(FORWARD);  //rotate the motor clockwise
  motor3.setSpeed(255); //Define maximum velocity
  motor3.run(BACKWARD); //rotate the motor anti-clockwise
  motor4.setSpeed(255); //Define maximum velocity
  motor4.run(BACKWARD); //rotate the motor anti-clockwise
}

void Stop()
{
  motor1.setSpeed(0);  //Define minimum velocity
  motor1.run(RELEASE); //stop the motor when release the button
  motor2.setSpeed(0);  //Define minimum velocity
  motor2.run(RELEASE); //rotate the motor clockwise
  motor3.setSpeed(0);  //Define minimum velocity
  motor3.run(RELEASE); //stop the motor when release the button
  motor4.setSpeed(0);  //Define minimum velocity
  motor4.run(RELEASE); //stop the motor when release the button
}

If anyone wants to further discuss pls send me you're discord or something we can talk on

That I can't see.

oops sorry

You can cross check your code and connection for the HC-05 module.

At first, make sure that your HC-05 module is working. Try to scan with your mobile and see if it appears in the available bluetooth devices list.

Thanks for posting your code correctly. Some more information about your hardware is important.

Thanks for updating with a photo. However a schematic is also required.

When I try to it doesn't show up i have to connect it to my laptop to make it show up

and when I try to move it with an third party app It doesn't move at all

Hello! Welcome to the Forum, and congratulations on posting the code using code tags on your very first post.

This will need a better description... What have you tried so far? What went wrong? Have you watched any tutorial using HC-05 and DC motors? What software on your laptop you´re using to send the commands?

Some common problems on this kind of project are trying to power the motors directly from Arduino or not providing enough power to the circuit at all. There might be other issues, but you´ll have to show us how´s everything connected.

You can get a lot of help here, as soon as you provide enough information for others to check what´s wrong. :wink:

Hi kind sir

yes i have followed a youtube tutorial on how to make one Bluetooth controlled Arduino RC Car | Control using your Mobile Phone | Ut Go - YouTube i have followed these steps

You're only doing a complete end to end system test. You have to break it down into sections, test each section, find the bad section, break it down again and test, and so on until you narrow it down to something that makes you say "aha".

It's called "divide and conquer methodology".

Right now, there are just too many possibilities to solve it by analysis or guessing.

but not exactly, right? Since if you had, it would probably work. But can you see how impossible it would be for us to know where you did anything different?

do u have something which we can talk further more

Sure, I'm here all day. What do you have in mind? What about the suggestions I already made?

that is true the thing is what have I exactly done wrong for this to happen

add me in discord mkn#7658

You are just repeating yourself. Nobody here can just guess. See reply #10. You need to do some targeted testing.

This is tedious. I have Discord. But why would I bother to take up a conversation with you there, when you don't respond to questions here? Any more begging here and I will just put you on my ignore list.

sorry

It's about what you can expect to achieve from a conversation...

anyways how do I find out what motors are working or not or do you have the code?