Go Down

Topic: Bluetooth Module AT command sending back it commands (Read 107 times) previous topic - next topic

veedemon

I am currently struggling to reset an HC-06 bluetooth module with AT command since my friend forgot the pin number.
I have my HC-06 LED blinked every 2 seconds (which means I made it into AT command mode). However, it always replies my command with the command itself, like it replies "AT" instead of "OK".

I am using arduino mega 2560 and here's my pin configuration
VCC  --> VCC
GND --> GND
KEY  --> PIN 9
RX   --> TX1
TX   --> RX1



Code: [Select]


void setup()
{
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);
 
  Serial1.begin(38400);
  Serial.begin(9600);
 
  Serial.println("Enter AT commands:");
}

void loop()
{

  if (Serial1.available())
    Serial.write(Serial1.read());

  if (Serial.available())
    Serial1.write(Serial.read());
}


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy