← All parts
HC-05 Bluetooth Module
GenericHC-05
Classic Bluetooth (SPP) serial module — pair it and it acts as a wireless UART. 3.3V logic on RXD (divide from 5V); the KEY pin enters AT command mode.
In stock
Specifications
0No specs listed.
Pinout
6| Pin | Name | Functions | Notes |
|---|---|---|---|
| 1 | EN/KEY | GPIO | HIGH at power-on = AT mode |
| 2 | VCC | POWER | 3.6-6V supply |
| 3 | GND | GND | Ground |
| 4 | TXD | UART | UART TX (to MCU RX) |
| 5 | RXD | UART | UART RX (3.3V) |
| 6 | STATE | GPIO | Connection status out |
Interactive pinout
Highlight:
HC-05
Click a pin to copy its name · tap a tag above to spotlight a bus.
Starter code
Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.
Arduino (C++)
arduino
// HC-05 Bluetooth SPP serial bridge — community starter example
#if defined(ESP32)
HardwareSerial& BT = Serial2; // ESP32: RX2=GPIO16, TX2=GPIO17
#define BT_BEGIN() BT.begin(9600, SERIAL_8N1, 16, 17)
#else
#include <SoftwareSerial.h>
SoftwareSerial BT(2, 3); // Uno: RX=D2, TX=D3
#define BT_BEGIN() BT.begin(9600)
#endif
void setup() {
Serial.begin(115200);
BT_BEGIN(); // HC-05 default SPP baud is 9600
}
void loop() {
if (BT.available()) Serial.write(BT.read()); // phone -> serial monitor
if (Serial.available()) BT.write(Serial.read()); // serial monitor -> phone
}MicroPython
python
# HC-05 Bluetooth SPP (ESP32) — community starter example
# uses the built-in machine.UART
from machine import UART
import time
bt = UART(2, baudrate=9600, tx=17, rx=16) # TX2=GPIO17, RX2=GPIO16
bt.write("Hello from ESP32\n")
while True:
if bt.any():
print(bt.read())
time.sleep_ms(50)Wiring
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VCC | +5V | 5V | Onboard regulator: 3.6-6 V on VCC |
| GND | GND | GND | |
| TXD | D2 (RX) | GPIO16 (RX2) | Module TX -> board RX |
| RXD | D3 (TX) | GPIO17 (TX2) | Board TX -> module RX; divide the Uno 5 V down |
Typical uses
- Wireless serial link to a phone/PC (SPP)
- Bluetooth remote control and telemetry