I have an HC05 previously set to baud 38400 and I wanted to revert so I used AT+UART=9600,0,0
but now the board isn't responding to any available baud rates in the IDE.
I'm using a NANO as serial convertor
How is the HC05 wired to the Nano? Please post a diagram and/or photos that clearly show the wiring.
What, exact, HC05 module do you have?
Can you put the HC05 into AT mode and communicate with it (at 38400 baud)?
It responded don't know how I just kept trying to do everything at once
1. Connect UNO/NANO and HC5 as per Fig-1.
Figure-1:
2. Upload the following sketch:
#include<SoftwareSerial.h>
SoftwareSerial SUART(2, 3); //SRX at UNO = 2, STX = 2
void setup()
{
Serial.begin(9600);
SUART.begin(38400); //AT Command Bd; data bd = 9600
}
void loop()
{
if (SUART.available())
{
char x = SUART.read();
Serial.print(x);
}
if (Serial.available())
{
char c = Serial.read();
SUART.print(c);
}
}
3. Do not pair the BT with any device.
4. Bring BT into AT Command.
(1) Disconnect 5V from BT.
(2) Connect EN-pin of BT with 3.3V of UNO/NANO.
(3) Press and hold the microswitch
(4) Connect 5V supply
(5) After 3/4 seconds, release the micro switch.
(6) The BT must have entered into AT Command Mode. The indication is that the red LED blinks once in two seconds.
5. Send AT+UART command to BT. BT should respond with the current Bd. Set it to 9600,0,0 if not at this Bd.
6. Remove 3.3V from EN-pin of BT. Disconnect 5V and connect back.
7. Change SUART.begin(38400) to SUART.begin(9600) in the sketch of Section-2 and upload it.
8. Pair it with your Android Phone.
9. You should be able to communicate between Arduino and Phone via HC5.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.