实现了电脑与单片机之间的蓝牙通信和手机与单片机之间的蓝牙通信,我想实现两个单片机之间的蓝牙通信,
发送端
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.print("Hello");
Serial.println("GeGe Xiang");
delay(100);
}
接受端
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
char val;
val=Serial.read();
if(val!=-1)
{
Serial.print(val);
}
}