This article describes how to connect the HC-06 Bluetooth module with an Arduino board in order to set the module name, baudrate and pin code.
The AT-commands to be used is described below. Verify the changes by any Bluetooth scanning device such as a smartphone.
AT Commands:
Component List
Software
//==============================================
// Arduino Sketch
//==============================================
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7,8); // RX, TX
void setup()
{
Serial.begin(9600);
pinMode(10,OUTPUT); digitalWrite(10,HIGH);
Serial.println("Enter AT commands:");
mySerial.begin(9600);
mySerial.write("AT");
Serial.println("Entered AT!");
}
void loop()
{
if (mySerial.available())
{
Serial.write(mySerial.read());
}
if (Serial.available())
{
mySerial.write(Serial.read());
}
}
//==============================================
Links and References