# Voice control car using hc-05 problem got problem

**URL:** <https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306>\
**Category:** General Guidance\
**Created:** [December 3, 2024, 2:59am UTC](https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306 "2024-12-03T02:59:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bijay09comp](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bijay09comp/32/1099004_2.png) [@bijay09comp](https://forum.arduino.cc/u/bijay09comp)\
**Post date:** [December 3, 2024, 2:59am UTC](https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306/1 "2024-12-03T02:59:39Z")

</div>

here i have assembled 4 dc motors , arduino uno , L293d motor driver , hc-05 bluetooth module and the progrom(sketch ) and also displays upload success. but its not working why? help me here

### sketch code from here

/\*

Arduino Bluetooth Controlled Car  
Install Adafruit Motor Shield Library before uploading this code.  
AFMotor Library [Library Install | Adafruit Motor Shield | Adafruit Learning System](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](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(38400); //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  
}

#####code ends here  
[IMG\_20241203\_083316|225x500](https://forum.arduino.cc/uploads/short-url/xIPA2tIjXGgHjWEXyRyF28DmrgK.jpeg)

---

<div class="post-metadata">

**Author:** ![bluejets](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/bluejets/32/1013044_2.png) [@bluejets](https://forum.arduino.cc/u/bluejets)\
**Post date:** [December 3, 2024, 3:18am UTC](https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306/2 "2024-12-03T03:18:09Z")

</div>

Code required to be in code tags.  
Include a circuit diagram showing all connections including power supplies ( Not fritzing) and all terminal pin numbers.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [December 3, 2024, 3:57am UTC](https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306/3 "2024-12-03T03:57:38Z")

</div>

Your power supply is not sufficient.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 1, 2025, 3:58am UTC](https://forum.arduino.cc/t/voice-control-car-using-hc-05-problem-got-problem/1328306/4 "2025-06-01T03:58:18Z")

</div>

Closed on June 1, 2025, 3:58am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
