Code is below.
int blueTx=5; //Tx
int blueRx=4; //Rx
int blackTx=13;
int blackRx=12;
SoftwareSerial mySerial2(blackTx, blackRx);
SoftwareSerial mySerial(blueTx, blueRx);
Setup(){
Serial.begin(9600); //시리얼모니터
mySerial.begin(9600); //블루투스 시리얼
mySerial2.begin(9600);
}
loop(){
motor();
delay(100000);
}
void motor(){
mySerial.write("motor"); //It would send data to first slave hc06
mySerial2.write("motor"); //It's not sent to second slave hc06
}
I have four hc06.
and set one for one same name and password to be connected .
for first hc06 master , I pinned D1,D2 and works fine.
but for second hc06 master, I pinned D6,D7 , but It dosen't send data "motor"
Software Serial only work for one?