The HC-05 is the cheapest way to talk to a Nano from an Android phone: robot cars, home-switch boards and simple data loggers all use it. It behaves like a serial cable without the cable.
Because the Nano’s only hardware serial port is wired to USB, the module goes on D10 (RX) and D11 (TX) with SoftwareSerial. The one part people skip is the divider on the HC-05’s RXD: the module is 3.3 V logic and the Nano drives 5 V.
Wiring
| Arduino Nano | HC-05 Bluetooth serial module | Wire | Notes |
|---|---|---|---|
| 5V | VCC | red | |
| GND | GND | black | |
| D10 | TXD | green | HC-05 TX (3.3 V) into SoftwareSerial RX — no divider needed. |
| D11 | RXD | yellow | Via 1 kΩ / 2 kΩ divider — Brings the Nano’s 5 V TX down to about 3.3 V. |
3.6–6 V on VCC (on-board 3.3 V regulator) — power from 5 V part, 5 V board. The module runs at 3.3 V logic. Its TXD connects straight to any board’s RX. Its RXD must not see 5 V: from an Uno or Nano TX, use a 1 kΩ / 2 kΩ divider. From ESP32 or Pico, connect directly.
Board quirks
- The Nano has one hardware UART and it belongs to the USB chip (RX0/TX1). Putting the HC-05 on D0/D1 blocks uploads, so this guide uses SoftwareSerial on D10/D11.
- SoftwareSerial is reliable at 9600 baud — the HC-05’s default. Don’t raise it above 38400 on a 16 MHz Nano.
- Leave EN and STATE unconnected for normal use. EN (or the button) is only for AT command mode.
- The HC-05 is classic Bluetooth: Android apps work, iPhones can’t see it. For iOS use a BLE module or an ESP32.
Code
// HC-05 Bluetooth module on an Arduino Nano using SoftwareSerial (the Nano's only hardware
// UART is shared with USB). TXD → D10 (Nano RX), RXD ← D11 through a 1 kΩ / 2 kΩ divider,
// VCC → 5V, GND → GND. Pair with PIN 1234 (or 0000) and use any "Bluetooth serial" phone app.
// Send 1 / 0 from the phone to switch the on-board LED; everything else is passed through.
#include <SoftwareSerial.h>
SoftwareSerial bt(10, 11); // RX, TX
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
bt.begin(9600); // HC-05 data-mode default
Serial.println(F("HC-05 bridge ready - pair the phone, then send 1 or 0"));
}
void loop() {
if (bt.available()) {
char c = bt.read();
if (c == '1') {
digitalWrite(LED_BUILTIN, HIGH);
bt.println(F("LED ON"));
} else if (c == '0') {
digitalWrite(LED_BUILTIN, LOW);
bt.println(F("LED OFF"));
}
Serial.write(c);
}
if (Serial.available()) bt.write(Serial.read());
}// HC-05 Bluetooth module on an Arduino Nano using SoftwareSerial (the Nano's only hardware
// UART is shared with USB). TXD → D10 (Nano RX), RXD ← D11 through a 1 kΩ / 2 kΩ divider,
// VCC → 5V, GND → GND. Pair with PIN 1234 (or 0000) and use any "Bluetooth serial" phone app.
// Send 1 / 0 from the phone to switch the on-board LED; everything else is passed through.
#include <SoftwareSerial.h>
SoftwareSerial bt(10, 11); // RX, TX
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
bt.begin(9600); // HC-05 data-mode default
Serial.println(F("HC-05 bridge ready - pair the phone, then send 1 or 0"));
}
void loop() {
if (bt.available()) {
char c = bt.read();
if (c == '1') {
digitalWrite(LED_BUILTIN, HIGH);
bt.println(F("LED ON"));
} else if (c == '0') {
digitalWrite(LED_BUILTIN, LOW);
bt.println(F("LED OFF"));
}
Serial.write(c);
}
if (Serial.available()) bt.write(Serial.read());
}Expected serial output
HC-05 bridge ready - pair the phone, then send 1 or 0
1
0
helloHC-05 bridge ready - pair the phone, then send 1 or 0 1 0 hello
Common errors
Phone connects but nothing arrives
TXD and RXD crossed the wrong way: HC-05 TXD goes to D10 (RX). Also check the app is sending at 9600.
avrdude: stk500_getsync() not in sync with HC-05 on D0/D1
Move the module off D0/D1 — it fights the USB chip during uploads. Full fix.
Module won’t pair
Fast-blinking LED = discoverable. Try PIN 1234, then 0000. A slow 2-second blink means AT mode — power-cycle without holding the button.