I am trying to change the name of my HC-06 using this tutorial
https://maker.pro/arduino/projects/how-to-change-the-bluetooth-module-name-easily-with-arduino
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
String command = ""; // Stores response of bluetooth device
// which simply allows \n between each
// response.
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
Serial.println("Type AT commands!");
// SoftwareSerial "com port" data rate. JY-MCU v1.03 defaults to 9600.
mySerial.begin(9600);
}
void loop()
{
// Read device output if available.
if (mySerial.available())
{
while(mySerial.available())
{ // While there is more to be read, keep reading.
command += (char)mySerial.read();
}
Serial.println(command);
command = ""; // No repeats
}
// Read user input if available.
if (Serial.available())
{
delay(10); // The DELAY!
mySerial.write(Serial.read());
}
}
I am using Arduino Pro Mini 3.3V so I didnt use divider.
It doesn't response when I try to send AT commands on serial monitor. Then when I connect it to my phone and send message, the message will be displayed to the serial monitor.
I try changing No line ending, Newline, Carriage return ,and NL and CR but nothing happens.
What is the problem?