Below is the code that I used to HC-06 bluetooth module.
it works fine, if I write AT on serial monitor, OK come.
But I just changed module to HM-10 and tested it by writing AT on Serial monitor,
It didn't answer any, So, I finally changed module to HC-06 without doing anything and then, wrote AT to Serial monitor then OK return...
Why is it? should I changed something?
ACC GND TX RX order is exactly same as HC-06...
#include <SoftwareSerial.h>
int blueTx=2; //Tx
int blueRx=3; //Rx
SoftwareSerial mySerial(blueTx, blueRx);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
Serial.println("go");
}
void loop()
{
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}