Follow the steps below in order to set the HC-05 module in AT command mode:
Connect the Arduino (without HC-05 module) to the computer and run empty code.
Disconnect the Arduino from the computer, wire the HC-05 module according the diagram below, then while pressing the button on the ZS-040 break-out board, connect the Arduino to the computer again. Now, The red LED on the ZS-040 break-out board must be blinking in 0.5Hz (one second on, one second off).
Run the sketch. Open the Arduino serial monitor, set baud rate to 38400
and choose both NL & CR
for line ending.
Type AT
, then press enter. You should see OK
. Now, you can configure your HC-05 module with AT commands. 🎉
Note 1. I've used Clion
+ PlatformIO
as IDE. But using the official Arduino IDE would be ok as well.
Note 2. To make the HC-05 module respond to all AT commands, keep the button on the ZS-040 break-out board pressed while entering commands.