← 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

0

No specs listed.

Pinout

6
PinNameFunctionsNotes
1EN/KEY
GPIO
HIGH at power-on = AT mode
2VCC
POWER
3.6-6V supply
3GND
GND
Ground
4TXD
UART
UART TX (to MCU RX)
5RXD
UART
UART RX (3.3V)
6STATE
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

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
VCC+5V5VOnboard regulator: 3.6-6 V on VCC
GNDGNDGND
TXDD2 (RX)GPIO16 (RX2)Module TX -> board RX
RXDD3 (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

Related parts

2