Hi,I have a problem.
I use HC-05(3.0) and Arduino pro mini.
I do AT+NAME=HC05 , AT+ROLE=0 , AT+PSWD=1234 , AT+ADDR? , AT+UART?
Then I use cellphone select HC-05,but it isn't appear.
My code:
#include <SoftwareSerial.h> // 引用程式庫
// 定義連接藍牙模組的序列埠
SoftwareSerial BT(2, 3); // 接收腳, 傳送腳
char val; // 儲存接收資料的變數
void setup() {
Serial.begin(9600); // 與電腦序列埠連線
Serial.println("BT is ready!");
// 設定藍牙模組的連線速率
BT.begin(38400);
}
void loop() {
// 若收到「序列埠監控視窗」的資料,則送到藍牙模組
if (Serial.available()) {
val = Serial.read();
BT.print(val);
}
// 若收到藍牙模組的資料,則送到「序列埠監控視窗」
if (BT.available()) {
val = BT.read();
Serial.print(val);
}
}
My wiring:
HC05 Arduino pro mini
Vcc Vcc
Gnd Gnd
Tx pin 2(Rx)
Rx pin 3(Tx)
EN 3.3V
How can i do?
Thanks.