Hello Everyone!
I am trying to get to HC-05 to interface with each other on different Arduinos(same exact model) and none of them are not responding to any of the commands like "AT". All I am getting is "ERROR: (0)" on startup of the code and then nothing else when I type in the AT commands. Also yes I put it in AT command mode.
Sorry it is hard to help if I do not know what I am working with. I cannot see what you have so I need more information. Post an annotated schematic, not a frizzy wiring diagram showing exactly how you have wired this. Be sure to show all connections, power sources, grounds etc and any other hardware components. Post links to technical information on each of the hardware items.
My arduinos are wired identically they consist of only the arduino and the HC-05 module. Then I have dupont wires from the module connecting straight to the arduino.
This is how I wired the HC-05.
VCC --> 5v
Gnd --> Gnd
Txd --> Digital 3
Rxd --> Digital 2
En --> 3.3v
No this is not yet the best to explain. You have to add a lot of more details.
what exact arduino?
Arduino Uno,
Arduino nano?
arduino micro?
arduino mega ?
?
did you really follow all steps of your tutorial?
did you do successful pairing of your two HC-05-modules?
did you try paring a single HC-05-module with a smartphone?
does your HC-05-module have a button for switching between datamode and AT-mode?
does your HC-05-module change between datamode and at-mode through a HIGH-signal on the EN-input?
As you can see from all these detail questions. A much more detailed description of the steps you have done is required to analyse your problem
It would help a lot of you could post a picture taken with a smartphone.
On this picture the wiring should be seen in a way that it is EASY to determine just from the picture which wire is connected to what.
Use a different color for each connection
GND black or blue
Vcc red
Tx a different color (example green)
Rx a different color (example yellow)
I have a Arduino Mega and I got stuck on step 4 when he used AT commands the code that I showed was the code the a tried to recreate the code in the picture at step 3. I did not successfully pair the modules. It does have a button for going into AT-Mode I just like to wire up the EN pin since it is easier on startup for me. I did not pair to a smart phone.
Hopefully these pictures can help clarify.
RXD --> Blue
TXD --> Brown
GND --> Orange
VCC --> Red
En --> White
If you connect the
HC-05-Rx--voltage-divider---Mega-Tx 18
HC-05-Tx-----Mega-Rx 19
you have to modify the code to use Serial1 instead of software-serial.
And you should start with a code that just checks if communication with the blue-tooth-module works at all.
I haven't read the documentation of the HC-05. It might well be that the HC-05-module sends some characters on power-up.
Or in case you have paired the HC-05 to a smartphone using a bluetooth-serial-app
You could send some characters from your smartphone and check if the arduino receives these characters.
With this test you only have to deal with a single HC-05-module
which means only half of possible bugs, faults etc. can occur
Using software serial on a Mega is pretty stupid but that doesn't mean it won't work. I believe your immediate problem is that it won't work on pins 2,3. If you simply change to pins 10,11, you might get a result.
Using a divider on Arduino Tx is clearly good practice but I have never heard of anybody actually frying Bluetooth by omitting this, so don't panic.
Note that HC 05 has two levels of AT commands. Some more obscure commands require a signal on EN even if you have a button.
You will be a lot better off reading Martyn Currey than Instructables.
Thank you for everyone's' help I really appreciate it. I found out that I needed to give the AT commands on a blank sketch in combination of the resistors.