Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

HC-05 Bluetooth with Arduino Nano — phone control via SoftwareSerial

Connect an HC-05 to an Arduino Nano on D10/D11 with a divider on RXD, pair a phone, and switch the on-board LED by sending 1 or 0.

Arduino C++Verified — core avr 1.8.8, 3 Nov 2026Compile-only

Community draft — report a mistake

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 NanoOnly the pins used are shown · 5 V logicHC-05 Bluetooth serial module1k│2k5VGNDD11D10EN (not connected)VCCGNDTXDRXDSTATE (not connected)
Also needed: 1 kΩ + 2 kΩ resistors (RXD divider).
Every connection
Arduino NanoHC-05 Bluetooth serial moduleWireNotes
5VVCCred
GNDGNDblack
D10TXDgreenHC-05 TX (3.3 V) into SoftwareSerial RX — no divider needed.
D11RXDyellowVia 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

hc05-nano.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// 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

Serial Monitor · 115200Output
HC-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.

↑↓ to move · Enter to open