AT Command response with HC-05 on Arduino Mega but not Nano Every

hi guys, I hope this is the correct category. I have tried to get an AT Command response in the serial monitor when using a newly bought HC-05 from Pihut, I can get one and interact fine when I use it with my Arduino Mega but when connected with my Arduino Nano Every there is none. The default Command baud on these HC-05's are 384,000 bps and I have followed the same logic when connecting the nano as I did with the mega. I have connected to the correct board act also on the IDE. I am just wondering if anyone knows of anything I may have missed.
This is for a remote to control a robotic arm I have built.

thanks
Curran

38400

How is the HC05 connected to the Nano Every?

If connected to the Rx and Tx pins, are you using Serial1 to address this UART.

yeah done that to no avail.

yeah so I've been connecting the Rx and tx pins on the hc-05 to the tx1 and rx0 on the nano every. The Nano every only has one hardware serial port so using the Serial1 isn't necessary im sure.

Actually, it is.
Serial.xxx goes to SerialMonitor (USB)
Serial1.xxx goes to the hardware uart.

ohhhh right lemme try that and thanks for the help, I really appreciate it!

I have done as you suggested and the Serial. & Serial1. and when I use the code underneath I get the expected responses from the module however when I don't use this code and I try to go in manually and type out my commands in 38400, I don't get a response which I find really strange. Don't suppose I could be doing anything else wrong? I am changing the baud rate to 38400 when in the serial monitor and of course still on NL & CR.

void setup() {
Serial.begin(9600); // Initialize primary hardware serial port (USB)
Serial1.begin(38400); // Initialize secondary hardware serial port at 38400 baud
}

void loop() {
// Send the "AT+UART?" command to the HC-05 to query its current UART settings
Serial1.println("AT+UART?");

// Wait for the HC-05 to respond
delay(100); // Adjust the delay as needed based on the HC-05 response time

// Check if there is any response from the HC-05
while (Serial1.available()) {
char response = Serial1.read();
Serial.print(response);
}
}

I'm not sure what you mean by "manually".

Did you change the HC to 38400? I believe it's 9600 (factory).

when I say manually I just mean the way you guys probably do it (set the serial monitor of the arduino ide to 38400 for command mode and then send 'AT' ect). However for whatever reason I don't get a response when I do this, I do get a response though when I use this code to send commands in 38400 and print out the responses in 9600. Ive no idea why though, or what I could be doing differently.

No, you send commands and receive responses in the same speed, it wouldn't work elsewere.
The question is - which speed do you use to connect to hc05 - 9600 or 38400?
When you open a Serial monitor in your PC - what the baudrate you see below the terminal window?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.