I have a hc-05 bluetooth module and I want to connect it to my arduino to enter the at mode, so I can change it to master and find out the adress. I have confirmed than the module is working because it appears in the bluetoth settings on my phone. I wired the module to the arduino with a voltage divider and set the baud rate 38400 and to both nl&cr in the serial monitor. I uploaded the blank sketch i tried using software serial but none of that made anything appear in the serial monitor. When powered on the module enters at mode because i hold the button and i see led blinking slowly. Can somemone please help me?
P.S
I am using a Arduino uno r4 Minima if it is relevant.
Hello @pamet32 - Please, show your wiring diagram and sketch.
That doesn't mean it is correctly wired to Arduino, it just means that the power is on.
Please post an annotated schematic. Your picture doesn’t clearly show the connections.
To be in 'AT' mode, I believe 'EN' has to be connected to 3V.
(Assuming yours is the version with the pushbutton.)
You should be able to get the address on the phone - no AT mode required.
@pamet32 said
and i used a blank sketch.
With the blank sketch method is used and the Arduino only serves as a serial pass through to the module then it does not want the cross connection.
I have indeed used this blank sketch method and it can be successfully used to work with AT mode.
Oops! I will delete my post to avoid confusion. I have never used that method.
Thanks, but i want to change the role of it too.
Yes i know i just forgot to include it in the schematic.
Perhaps you could upload a pic of the device in question?
(Maybe it's not AT-able.)
This is just a red herring. It is an HC-05, and the fact that you put it in AT mode by pushing the button already attests to that.
I guess I have to ask: have you had it working as a slave? If not, a simple hello to the phone with suffice - after you have changed the wiring.
I am not so sure what you mean, could you explain it to my a little better please?
I think that we just want to confirm that the module is working properly in communication mode.
You are using the blank sketch method, but there is an alternative way to use an Arduino and a serial-in serial-out sketch. It is described in detail in Martyn Currey's Website.
https://www.martyncurrey.com/hc-05-zg-b23090w-bluetooth-2-0-edr-modules/
Scroll down until you find the section titled
HC-05 (ZG-B23090W): Communication and AT commands
I would try the alternative method using the sketch. One thing that may be an issue is that with the blank sketch procedure as linked by Mechatronics the voltage divider from the communication mode maybe an issue with the signal levels in the pass through mode.
Wow! I hope that's true. Pass-through IS the alternative, I always thought it was a dumb idea, and now I want to be sure of it...
Thank you so much @cattledog you have solved my problem i am so happy. Thank you very much.