I used a simple sketch shown below to activate the AT mode but every time I write commands in the serial monitor I don’t receive any answer(OK)
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX
void setup()
{
Serial.begin(9600);
Serial.println(“Enter AT commands:”);
BTSerial.begin(38400); // HC-05 default speed in AT command more
}
void loop()
{
if (BTSerial.available()) // read from HC-05 and send to Arduino Serial Monitor
Serial.write(BTSerial.read());
if (Serial.available()) // Keep reading from Arduino Serial Monitor and send to HC-05
BTSerial.write(Serial.read());
}
I used the code at teh bottom to connect the TX of the HC05 to the pin 2 of the motherboard and RX to pin 3. I don’t unerstand why in AT mode I have nothing as a reply.
I tried another method were using a phone to turn on a led but when I give command with the phone the BT module doesn’t see anything. That’s why I think the problem is the HC05 not receiving but I don’t know how to solve it.