I'm trying to set up my Bluetooth HC-05 but I'm having problems. I am using an Arduino Uno and I connect the bluetooth TX and RX cables to 0 and 1 of the Arduino. The code I am using is the following:
#include <SoftwareSerial.h>
SoftwareSerial BT(0,1);
void setup()
{
Serial.begin(9600);
BT.begin(38400);
Serial.println("Introduzca un comando:");
}
void loop()
{
if(BT.available())
{
Serial.write(BT.read());
}
if(Serial.available())
{
BT.write(Serial.read());
}
}
The problem comes when I open the serial monitor to send AT commands but I do not receive the correct message, I receive the following image.
https://drive.google.com/file/d/1StjO7i8S_lsV39meM8L2SeVMe-TT-ZPb/view?usp=sharing
I first show a message but when I enter the AT command, instead of receiving OK I receive xxxo. I suppose it is due to the bauds but I do not know how to put them, because the bluetooth I use was left to me and apparently it is already configured and I want to make changes, but it does not show me AT messages in a visible way.