HC-06 Bluetooth Module: Everything You Need to Know (Setup & Code)
Welcome to the community! It’s always exciting to meet another tech enthusiast. This space is built by creators, for creators. Today, we’re diving into the HC-06 Bluetooth Module. If you’ve used HC-05 before, the HC-06 is its simpler, slave-only cousin — perfect when you just need your Arduino or ESP32 to be discoverable and accept connections from your phone or laptop. Let’s break down how it works and how you can quickly add wireless control to your next project.
What is HC-06 Bluetooth Module?
Metadata; Photo of an HC-06 Bluetooth Module
The HC-06 is a low-cost Bluetooth 2.0 + EDR serial communication module that operates only in slave mode. Consequently, it is one of the most beginner-friendly Bluetooth options for hobbyists who want to send/receive data wirelessly without needing master functionality. This module creates a virtual UART link over Bluetooth, allowing your microcontroller to communicate with smartphones, PCs, or tablets. Therefore, it is ideal for simple projects like remote control, data logging, or wireless debugging. Additionally, it comes pre-configured with default settings and supports basic AT commands for customization.
Working Principles of HC-06 Bluetooth Module?
Slave-only Bluetooth Communication: First, the HC-06 acts as a Bluetooth slave device — it waits for another Bluetooth device (usually your phone) to connect to it. As a result, once paired, it creates a transparent serial bridge: whatever data you send over the UART pins is transmitted wirelessly, and received data appears on the RX pin.
AT Command Configuration: Moreover, you can enter AT command mode (by connecting the KEY/EN pin high during power-up) to change the module name, password (default 1234), baud rate, and other settings.
Connection Status: In addition, the onboard LED blinks slowly when waiting for connection and stays solid (or blinks fast) when paired and connected.
Hardware Overview of HC-06 Bluetooth Module?
The HC-06 is a compact blue PCB with the Bluetooth chip, antenna, status LED, and usually six-pin header (some versions have four).
Metadata; Close-up of HC-06 module with LED and pins
The LED gives clear visual feedback about connection status. As a result, it’s very easy to tell whether the module is paired or not. Most boards have a KEY/EN pin for AT mode entry.
Supporting Circuitry: Additionally, it includes a 3.3V regulator (logic level is 3.3V — use level shifter for 5V Arduino TX). Consequently, the module is reliable and draws very little power.
Technical Specifications of HC-06 Bluetooth Module?
- Function: Slave-only wireless UART/serial over Bluetooth.
- Bluetooth Version: 2.0 + EDR (Class 2).
- Range: Up to 10 meters (line-of-sight).
- Data Rate: Up to 115200 bps (default 9600).
- Operating Voltage: 3.6V to 6V (logic 3.3V).
- Current Consumption: ~30-40 mA connected.
- Default Settings: Name: HC-06, Password: 1234, Baud: 9600.
- Pinout: VCC, GND, TXD, RXD, KEY/EN, STATE (some versions).
HC-06 Bluetooth Module Pinout?
Metadata; Photo of an HC-06 Bluetooth Module Pinout
- VCC: Power supply (3.6V–6V, commonly 5V)
- GND: Ground
- TXD: Transmit (connect to Arduino RX)
- RXD: Receive (connect to Arduino TX) – 3.3V logic
- KEY/EN: Hold high during power-up to enter AT command mode
- STATE (optional): High when connected
Using HC-06 Bluetooth Module with Arduino
In this part, we will learn how you can use the HC-06 with Arduino Uno, Nano, or Mega to create a wireless serial connection in just a few minutes – even if you’re a beginner.
What You Need:
- Any Arduino board (Uno recommended)
- HC-06 Bluetooth Module
- Jumper wires
- Level shifter (recommended for Arduino TX to HC-06 RX)
- Android phone with Bluetooth Serial app (e.g., Serial Bluetooth Terminal)
Wiring Diagram:
Metadata; Wiring Diagram of HC-06 Bluetooth Module with Arduino Uno
Basic Connections to Arduino:
- VCC: Connect to 5V on Arduino
- GND: Connect to Arduino GND
- TXD (HC-06): Connect to Arduino RX (e.g., pin 10 via SoftwareSerial)
- RXD (HC-06): Connect to Arduino TX (e.g., pin 11) – use level shifter!
Code:
No special library is required – just use SoftwareSerial. Here’s a tested simple code – just copy-paste into your Arduino IDE.
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11); // RX, TX
void setup() {
Serial.begin(9600);
BT.begin(9600); // Default HC-06 baud rate
Serial.println("HC-06 Bluetooth Ready! Connect from phone...");
}
void loop() {
if (BT.available()) {
Serial.write(BT.read()); // Send data from Bluetooth to Serial Monitor
}
if (Serial.available()) {
BT.write(Serial.read()); // Send data from Serial Monitor to Bluetooth
}
}
Note: This is a basic example using SoftwareSerial – no external library needed.
Metadata; Example of HC-06 Bluetooth communication in Arduino Serial Monitor
After uploading, pair your phone with HC-06 (password usually 1234). Open a Bluetooth terminal app, connect, and start typing — messages will appear in the Serial Monitor, and anything you type in Serial Monitor will appear on your phone!
Wrapping up
That’s a wrap on today’s guide! I hope this walkthrough made it easier to understand how this component fits into your next big idea. Technology is all about experimenting and learning as you go. If something didn’t click, or if you’re hitting a wall with your wiring or code, don’t sweat it! Just drop a comment below. I’m always here to help you troubleshoot and get your project back on track.




