HC-05蓝牙模块与Arduino通信测试
2016-01-04 本文已影响0人
张建飞
-
硬件
- Arduino UNO
- HC-05 Bluetooth module master/slave
- ZS-040
- 杜邦线若干
- 有蓝牙适配器的PC一台
-
软件
- Arduino IDE
- application serial communicator
-
步骤
- 接线
- 接线
VCC --> 5V
GND --> GND
TX --> RX
RX --> TX
- 测试代码
```
#include <SoftwareSerial.h>
SoftwareSerial Conn(10, 11); //RX, TX
void setup() {
// put your setup code here, to run once:
Conn.begin(38400);
}
void loop() {
// put your main code here, to run repeatedly:
Conn.println("Test Transmission String.");
delay(600);
}
- 结果