I am new to bluetooth business. I'm using the Arduino Uno board with HC-05 module. I want to send AT commands through the serial monitor. I load the following code and send AT commands through the serial monitor. I dont see the AT command sent or response received on the serial monitor output window. I tried the same one on Arduino Mega as well. Still no response. Any help is appreciated..
#include <SoftwareSerial.h>
SoftwareSerial m(0,1); // rx, tx
void setup()
{
m.begin(9600);
Serial.begin(9600);
Serial.println("BEGIN!");
}
void loop()
{
if (m.available()) {
Serial.println("Available!");
value = m.read();
Serial.println(value);
else
{
Serial.println("not available");
}
}
I tried connecting with my android device and send an input. but every time i send any input the serial monitor shows the serial is not availble. help me with this.
Thank you.