任务1——蓝牙与PC的数据传输
1、任务目标
2、流程图

3、程序编程

4、硬件连接
1)甜橙与蓝牙的接线
2)打开电脑蓝牙


3)将PC蓝牙与蓝牙模块进行配对连接




5、Q&A
6、拓展
Last updated
Was this helpful?








Last updated
Was this helpful?
Was this helpful?
\#include <SoftwareSerial.h>
volatile char s;
SoftwareSerial mySerial(10,11);
void setup(){
s = 0;
Serial.begin(9600);
mySerial.begin(9600);
}
void loop(){
if (mySerial.available() > 0) {
s = mySerial.read();
Serial.print(s);
}
}