Problem mit Hc-05

hello together,

I have a problem with my Bluetoothsensor Hc-05(when I wanted to connect it with my cell phone).
Can you help me???

Thanks a lot!!

Max

  1. Please provide a proper description of your problem.
  2. Please provide your code (using code tags, the </> button above the reply textbox).
  3. Please provide a wiring diagram (reasonably sized photo (around 300 kB) of a handdrawn one is fine.

This is just as much a phone problem as an Arduino one.
Please confirm that you are using an Android phone.
Please confirm that there is a flashing LED on the Bluetooth module.

I have an android phone huawei p30 lite

Here is a good page on connecting the HC05 to an Arduino.

Before you can use the HC05 to send and receive data to/from your Arduino you must pair the HC05 with the phone and connect the paired HC05 to an app on the phone that can send and receive data. My favorite app for setting up the initial communication is the Serial Bluetooth Terminal app.

What Arduino board are you using? Show how the HC05 is wired to the mystery Arduino.

Here is my test code for an Uno (or Nano) to test communication between a HC05 and a Bluetooth capable device running serial Bluetooth terminal.

//Sends from serial monitor to the Bluetooth device app
// receives from the Bluetooth device app

#include <SoftwareSerial.h>
SoftwareSerial BTserial(4, 7); // RX | TX

void setup()
{
   Serial.begin(9600);
   BTserial.begin(9600);
}

void loop()
{
   if (Serial.available())
   {
      BTserial.write(Serial.read());
   }
   if (BTserial.available())
   {
      Serial.write(BTserial.read());
   }
}

Whatever you type into the serial monitor should show up in the Bluetooth terminal and visa versa.

Here is a good page on connecting the HC05 to an Arduino.

You might find the following background notes useful.

Hello together,

thank you for your helpfull tipps but the situation is:

  • i programmed a bluetooth control app (it works)
  • i tested the robot car with the hc-05 (it works too, but often the connection was broken )
    What can i do now??
    How can i fix that there is often a broken connection??

Max

PS: I ORDERED THE hc-05 at ali-express.

Well, I guess that that is all one can do - guess.

bad wiring
inadequate power
car goes out of range
inadequately exposed antenna