Hi all!
I use two UNO boards and two HM-10 Bluetooth so they can be interconnected, but when I power off and restart, they can't connect automatically. I also keyed "AT+CONNL", and it didn't return any message.
This is my serial port window:
These are my code:
#include <SoftwareSerial.h>
int HM10_TxD = 2; int HM10_RxD = 3;
SoftwareSerial BT(HM10_TxD, HM10_RxD);
char cB, cS;
void setup()
{
Serial.begin(115200);
BT.begin(115200);
}
void loop() {
if (Serial.available()) {
cB = Serial.read();
BT.print(cB);
}
if (BT.available()) {
cS = BT.read();
Serial.print(cS);
}
}
Please help me, thanks!