Hi, I am relatively new to Arduino and such and had a problem with my HC-05 setup. I have looked around and my exact issue is on the forums already however my situation is a bit unique and I couldn't quite get the answer I was after.
Basically the problem is on the Serial Monitor attempting the command "AT" results in outputs such as 'xxxx?x', which is exactly what some other users had.
I am using Arduino Uno with an Adafruit motor controller shield, which unfortunately steals literally every single pin so I have had to modify it (hence why I believe my situation is "unique"). I cut pins 0 and 1 off and soldered some power pass through pins. So I currently have the pin that says RXD on the actual module itself plugged into 0, and the one saying TXD plugged into 1. I do not have a voltage divider installed, so the board is receiving 5V. I know that it runs on 3.3 and have seen that using 5V can be an issue however some guides insist that you can in fact use 5V, and they have wiring diagrams to support that.
Uploading code is a bit difficult since I have to unplug it every time because Arduino wont let you upload with anything plugged into 0 and 1. So essentially I unplug pins 0 and 1, upload code, plug them back in.
So the code I am using is this:
#include <SoftwareSerial.h>
//Change these to whatever pins you're using
SoftwareSerial blueSerial(0, 1); // RX, TX
void setup()
{
Serial.begin(9600);
blueSerial.begin(38400);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
}
void loop()
{
if (blueSerial.available())
{
Serial.write(blueSerial.read());
}
if (Serial.available())
{
blueSerial.write(Serial.read());
}
}
And then opening serial monitor and typing commands yields what I had said before. The response does differ depending on what command I give, but I don't know whether that is a board rate thing or not. I have tried a few combinations of board rate option in the serial monitor, but to no avail.
Last thing: I think the module needs to be in AT mode for this to work, and guides say it is in this mode when the LED blinks "slowly". I don't really know how "slowly" it should be blinking but regardless of whether I press the button onboard or not it blinks at a rate of about 4-5 times per second. Sorry for long post here, I wanted to give every piece of information I had in the hopes that that would result in an easier resolution.