Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›IoT & Wireless
  4. ›HC-05 Bluetooth Module
Step 9 of 16 in ESP32 and IoTPart of a learning path.
Next

How-to · Beginner · 3 min read

HC-05 Bluetooth Module

Wiring, AT Commands and Arduino Code

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerWiring an HC-05 to an ArduinoEcho data between phone and ArduinoPairing with a phoneAT commands: rename, change PIN and baudHC-05 vs HC-06 vs ESP32 vs HM-10Try itCommon mistakesFAQsParts and next steps
Short answer

The HC-05 is a Bluetooth Classic module that acts like a wireless serial cable: whatever you send to its TX/RX pins appears on a paired phone or PC, at 9600 baud by default. Power it from 5 V, but its RX pin is 3.3 V, so use a voltage divider from the Arduino's TX. Hold the button at power-up for AT mode to change the name, PIN or baud rate.

Key specs at a glance

Bluetooth
Classic 2.0, Serial Port Profile (SPP)
Supply
3.6 to 6 V on the module's VCC (regulator on board), about 40 mA
Logic
3.3 V; RX needs a divider from 5 V boards
Default baud
9600 (data), 38400 (AT mode)
Default PIN
1234 or 0000
Range
About 10 m
HC-06
Slave only, no mode button; HC-05 can be master or slave
01

Wiring an HC-05 to an Arduino

HC-05 pinArduino UnoNotes
VCC5V
GNDGND
TXDD10 (SoftwareSerial RX)3.3 V signal, fine for a 5 V input
RXDD11 (SoftwareSerial TX) via 1 kΩ / 2 kΩ dividerProtects the module's 3.3 V RX
EN / KEY3.3 V only to enter AT modeOr hold the button at power-up
STATEOptionalHIGH when connected
VCC
Arduino Uno:
5V
GND
Arduino Uno:
GND
TXD
Arduino Uno:
D10 (SoftwareSerial RX)
Notes:
3.3 V signal, fine for a 5 V input
RXD
Arduino Uno:
D11 (SoftwareSerial TX) via 1 kΩ / 2 kΩ divider
Notes:
Protects the module's 3.3 V RX
EN / KEY
Arduino Uno:
3.3 V only to enter AT mode
Notes:
Or hold the button at power-up
STATE
Arduino Uno:
Optional
Notes:
HIGH when connected
02

Echo data between phone and Arduino

Use SoftwareSerial on pins 10 and 11 so the hardware serial stays free for uploads. On an ESP32 you do not need an HC-05 at all: use its built-in Bluetooth (BluetoothSerial library).

Bluetooth serial bridge and LED control · Arduino C++Verify & upload in Electrolark
#include <SoftwareSerial.h>
SoftwareSerial bt(10, 11);   // RX, TX

void setup() {
  Serial.begin(9600);
  bt.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  if (bt.available()) {
    char c = bt.read();
    if (c == '1') digitalWrite(LED_BUILTIN, HIGH);
    if (c == '0') digitalWrite(LED_BUILTIN, LOW);
    Serial.write(c);
  }
  if (Serial.available()) bt.write(Serial.read());
}
03

Pairing with a phone

Pair in Android Bluetooth settings (PIN 1234), then open a Bluetooth serial terminal app such as Serial Bluetooth Terminal and connect to HC-05. Typing 1 or 0 switches the LED. iPhones do not support SPP, so for iOS use an ESP32 with BLE or an HM-10 BLE module.

04

AT commands: rename, change PIN and baud

  1. 1
    Power off, hold the small button (or tie EN to 3.3 V), power on. The LED blinks slowly every 2 seconds.
  2. 2
    Set the sketch's bt.begin(38400) and the Serial Monitor to "Both NL & CR".
  3. 3
    Send AT and expect OK. Then:
CommandDoes
AT+NAME=OLRobotSet the Bluetooth name
AT+PSWD="5678"Set the pairing PIN (quotes on newer firmware)
AT+UART=115200,0,0Set data baud rate
AT+ROLE=1Make it a master (to connect to another HC-05 or sensor)
AT+ORGLRestore factory settings
CommandDoes
AT+NAME=OLRobot
Set the Bluetooth name
AT+PSWD="5678"
Set the pairing PIN (quotes on newer firmware)
AT+UART=115200,0,0
Set data baud rate
AT+ROLE=1
Make it a master (to connect to another HC-05 or sensor)
AT+ORGL
Restore factory settings
05

HC-05 vs HC-06 vs ESP32 vs HM-10

ModuleTypeWorks with iPhoneChoose it for
HC-05Classic SPP, master or slaveNoArduino robots and data loggers with Android
HC-06Classic SPP, slave onlyNoCheapest Android serial link
HM-10 / AT-09Bluetooth LEYesiOS apps, low power
ESP32 (built in)Classic + BLEYes (BLE)New projects: no extra module, Wi-Fi too
HC-05
Type:
Classic SPP, master or slave
Works with iPhone:
No
Choose it for:
Arduino robots and data loggers with Android
HC-06
Type:
Classic SPP, slave only
Works with iPhone:
No
Choose it for:
Cheapest Android serial link
HM-10 / AT-09
Type:
Bluetooth LE
Works with iPhone:
Yes
Choose it for:
iOS apps, low power
ESP32 (built in)
Type:
Classic + BLE
Works with iPhone:
Yes (BLE)
Choose it for:
New projects: no extra module, Wi-Fi too
06

Try it: Voltage divider calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Connecting the Arduino's 5 V TX directly to the module's RX.
  • !Using the hardware serial pins and then failing to upload sketches.
  • !Trying AT mode at 9600 baud; it is 38400 by default.
  • !Expecting an iPhone to connect; SPP is not supported on iOS.
  • !Forgetting to set the terminal line ending to NL and CR for AT commands.
08

Frequently asked questions

What is the HC-05 used for?

Adding a wireless serial link to an Arduino, so a phone or PC can send commands or receive sensor data over Bluetooth.

What is the difference between HC-05 and HC-06?

The HC-05 can act as master or slave and has a mode button; the HC-06 is slave-only. Both use the same wiring and serial behaviour.

Does the HC-05 work with iPhone?

No. It uses Bluetooth Classic SPP, which iOS does not expose to apps. Use a BLE module (HM-10) or an ESP32 for iPhone projects.

How do I enter AT mode on the HC-05?

Hold the button on the module while powering it on, or pull the EN/KEY pin high. The LED blinks slowly, and the module listens at 38400 baud.

Should I buy an HC-05 or an ESP32?

For a new project, an ESP32 board gives Bluetooth and Wi-Fi with no extra wiring. Use the HC-05 to add Bluetooth to an existing Arduino.

Parts for this guide

  • TP-Link UB500 Bluetooth 5.3 Nano USB Adapter
    ₹824View
  • Resistor Assortment Kit (30 Values)
    ₹33View
Shop Wi-Fi & Bluetooth ModulesShop Arduino Boards

Calculators

Voltage divider calculator

Terms in this guide

UARTUniversal asynchronous receiver-transmitter: two-wire serial (TX and RX) used by GPS, Bluetooth modules and debug output.SPPSerial Port Profile: the Bluetooth Classic profile that makes the HC-05 look like a wireless serial cable to a phone or PC.BLEBluetooth Low Energy: the low-power Bluetooth profile used by phones, fitness bands and the ESP32. It is not compatible with the HC-05's Bluetooth Classic serial profile.Baud rateThe speed of a serial link in bits per second. Both ends must use the same value; 9600 and 115200 are the usual defaults.Voltage dividerTwo resistors in series that output a fixed fraction of the input voltage.

Projects that use it

Put this into practice: 4 step-by-step builds in our project library use parts from this guide.

Intermediate · 3 hoursBluetooth phone-controlled 4WD carView projectIntermediate · 2 hoursBluetooth 4-channel home switchView projectIntermediate · 2–3 hoursBluetooth phone PIN door lockView project
Browse all 4 projects

Keep learning

Component guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersComponent guideBeginnerArduino UnoThe Arduino Uno is a beginner-friendly microcontroller board that reads sensors and controls LEDs, motors and relays using simple C++ programs called sketches.5 min read · Boards & MicrocontrollersHow-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & WiringComparisonBeginnerMotor Drivers ExplainedA motor driver lets a low-power microcontroller control the speed and direction of motors using an H-bridge.4 min read · Motors & Motion

Sources

  • HC-05 Bluetooth module datasheet and AT command set (ITead / Guangzhou HC)
  • Arduino SoftwareSerial reference

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWiring an HC-05 to an ArduinoEcho data between phone and ArduinoPairing with a phoneAT commands: rename, change PIN and baudHC-05 vs HC-06 vs ESP32 vs HM-10Try itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide2 items · ₹857

TP-Link UB500 Bluetooth 5.3 Nano USB Adapter · Resistor Assortment Kit (30 Values)

Run itChange the inputs and watch the output

Type 1 or 0 as if from the phone app. The LED follows, and each character is echoed to the Serial Monitor.

Built-in LED OFF
Serial monitor9600 baud
 

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question