Picture of Arduino AND Bluetooth HC-05 Connecting easily

Hello Every body , This is my first artical on , I'm so happy for that , and I will start by How to connect arduino with bluetooth , I suffered a lot of problems when I try to connect it as the website and instructable artical did , So i decided To share my experience with You

The bluetooth module I will use today is HC-05 which is so familiar and cheap ,

Most tutorial on The website Connect the bluetooth with default Rx and Tx on the arduino Board , I faced a lot of problem and bluetooth didn't work will .

But arduino  support something Called Software Serial , which allow You to change any arduino board pin to serial pin

so After reading this article you will be able to:

1) Connect arduino Board with PC By Bluetooth , to send and receive data .
2)Connect arduino Board with Any android device .

so you can send your information , Like Sensors reading , from arduino to PC Or android device , and you can build your Home automation system by bluetooth , and controlling your robot wirelessly

Remove these adsRemove these ads by Signing Up

Step 1: Material and connection

Picture of Material and connection
you need to do this experiment :

1) Arduino Board " I used Arduino Uno ".
2) Bluetooth module HC-05.
3)Solderless jumper.
4)Bread Board .
5)Battery 9V "Optional".

The connction between  Arduino and bluetooth is like the schematic above 

1-40 of 47Next »
sunxing221 year ago
well done , thanks for this tutorial
please do not forget to post this tutorial in your blog in Arabic :)
aphexZero made it!yesterday

Thank you very much Mohannad! This one was easy and works like a charm.

AredaM16 days ago

nice project i do to ry

LawrenceC11 month ago

Hi Everyone,

For the third step, in which we upload the code to make the arduino run, do we upload it in an arduino sketch and then view it in the TeraTerm? It seems that when the teraterm and arduino are sharing the same com port, it gives the error ("Serial com port 4 is already in use") Is there anyway to fix it?


fhovin1 month ago

This works fine for me when I test it
through the serial monitor in the Arduino IDE. And I can connect and
pair both windows and my android phone to the device. However, I'm not
able to get any reaction in Tera Term or any other terminal emulator on
Windows, nor the Bluetooth Terminal Emulator I'm using in Android. No
echo return, and no on/off switching. In short, it works in the Serial
Monitor but not over bluetooth.

Any ideas?

Sir what u have provided lonk to download not found in google play say way to instal
mccreamark1 month ago

Hi ,

Thank you for a great instructable. I modified your code slightly to allow the use of hardware Serial1 , so I could connect my HC-05 to my Arduino Mega 1280. All I did was ctrl+ f to replace your software serial object with Serial1 so Genotronex.begin(9600); will become Serial1.begin(9600); I also used the Tx1 and Rx1 pins connected to my HC-05 RX and Tx respectively . I had to remove the USB connection from my PC (Win7)to my Arduino and power it from a 5v wall wart. As my Arduino will not connect properly with bluetooth when the USB serial is connected. I xctu to scan for the (Blue Tooth)serial ports and used Putty Tel to try each com port (10 , 11 ), I had read somewhere the lower number would work but in my case it was Com port 11. I have put my mod of your code below for anyone using a mega.

//SoftwareSerial Serial1(10, 11); // RX, TX

int ledpin=13; // led on D13 will show blink on / off

int BluetoothData; // the data given from Computer

void setup() {

// put your setup code here, to run once:


Serial1.println("Bluetooth On please press 1 or 0 blink LED ..");



void loop() {

// put your main code here, to run repeatedly:

if (Serial1.available()){;

if(BluetoothData=='1'){ // if number 1 pressed ....


Serial1.println("LED On D13 ON ! ");


if (BluetoothData=='0'){// if number 0 pressed ....


Serial1.println("LED On D13 Off ! ");



delay(100);// prepare for next data ...


returner2 months ago

Hi, i have a question and i hope you guys can help me with this. how does the arduino actually know actually know which data it is going to send or receive? in which part of the code does it do that? i want to make two arduinos one having a HC05 as a master sending data over to a HC06 slave on two different laptops. I hope you can answer me.

The library opens a serial port and between the devices and that is what is used to send and receive the data. Therefore the data is sent in the code via the Serial.println and is received in the code via the statement. I suggest looking at some examples of the serial communications that come with the IDE to assist further

rfgsoftware1 month ago

Well done, nice article.

gft20121 month ago


I can connect to AT commands using HC-05 it responds everything,. But when I use any application from an application to light led up. it doesn't light the led up. but hc 05 keeps blinking. I am using Ardudroid application for testing. My hc 05 is paired already and I'm connected to HC05 But it doesn't light the LED.

arduino code:

int ledPin = 13;

int state = 0;

int flag = 0;

void setup(){

pinMode(ledPin, OUTPUT);

digitalWrite(ledPin, LOW);



void loop(){

if(Serial.available() > 0){

state =;

flag = 0;


if(state == '0'){

digitalWrite(ledPin, LOW);

if(flag == 0){

Serial.println("LED: off");

flag = 1;



else if(state == '1'){

digitalWrite(ledPin, HIGH);


Serial.println("LED: ON");

flag = 1;




Any solution for this guys? What supposed to be the problem?

Thank you for your help guys

PaymaanJ1 month ago

RX/TX from HC-05 carrier board you use are only 3.3 volts (I only saw a carrier board with 3.3 to 5 volt level translator on a HC-09 board), so if you pass too much data, your HC-05's RX will finally burn. So put some kind of level translator between those 2 pins, or your bluetooth device will burn.

mayankt282 months ago

No such app exists(android app) please update your link

dilushan2 months ago

Since app mentioned author not existed i tried bluetooth terminal app. It's working without any issue. U need to pair the HC-05 before using application

dilushan2 months ago

I had issue before and i fixed it. For anyone who having the same issue. My board is Mega 2560. I'm in windows 8.1 and COM15 was the outgoing port in my case. When I try to connect it using teraterm it always complained "can't connect to COM15". I supplied 5V to the HC-05 before. When i changed it 3.3V voltage suddenely it begin to work. After that i switched back to 5V and its also working. Still i don't have any idea what happen before

ayushi1233 months ago

after following this instructable, things went out so easily! thanku very much! I made it succesfully. :)

MonaE3 months ago

the application is no longer available on the play store page .. please , put it back , i neeeeeeed it urgently !

thebluesman007 made it!3 months ago

lavanyaes3 months ago


I need to interface the arduino with smart phone instead of PC. Please suggest ways for mobile interface of arduino. Thank you

insanerish3 months ago
Anuj FALCON3 months ago

IT worked and its toooooooooooooooooooooooo simple

Tres bien

santan0071 year ago

Done the connections in exactly the same manner, also used the same sketch, still doesnt work for me. Neither with android nor TeraTerm.
Please help. What could be the possible problem?

kasisnu santan0078 months ago

Did you figure out what was wrong?

loulaw12 kasisnu6 months ago

I am having the same problem . Can't get any thing to show on the TeraTerm and the 1 or 0 command doesn't do anything

kasisnu loulaw124 months ago

Try following along with the tutorial by GreatSott! on Youtube. I found it extremely useful!

antixmehra4 months ago

Thank you SO MUCH for this tutorial. I am using a Mac, so the procedure was a bit different.

You don't need Tera Term

1. Simply pair your device using the bluetooth icon, the sensor is detected as HC-05, and the passcode is 1234 (note: the connection might or might now work, and sometimes takes many tries. Sorry, but I really have no idea why).

2. Make sure your arduino is NOT connected using the USB cable. Press upload, and it will give you the option of /dev/tty.HC-05-DevB (In my Mac, it shows 0-9, pick the lowest one). Your program will now be uploaded normally.

3. Open the Serial monitor and type 1 or 0 in the textbox next to send, right at the top. Sending 1 turns on the LED on pin 13, Sending 0 turns it off.

Once again, thank you very much for this instructive and coherent tutorial!



cureinside5 months ago

Nice project. now i heave several question, hope you can help

1. will it work if i used atmega8525 instead of arduino kit|

2. do i need level converter module? or can i just use simple voltage divider to make it 3.3v for hc-05 vcc? because from what i read, it supplied with 3.3V vcc.

thanks :)

loulaw126 months ago

Very nice tutorial. I set my Arduino and HC-05 up exactly as you described. I ran a simple sketch that writes numbers to the monitor via Serial write. It works just fine when I use the USB connection and the Arduino serial monitor, but when I try the Teraterm via the bluetooth the page stays blank. The HC-05 seems to connect just fine and the bluetooth com port listed is com 5. I also tried it on the Arduino IDE using com 5 to the serial monitor and nothing happens. Any suggestions of how to get the Tera Term to display the Arduino messages?

I tried your sketch also, but the same results


tym3k7 months ago

Thank you very much! Now my bluetooth module finally works!

zx lee1 year ago

For HC05 there are 6 pins, state, Rx, Tx, GND, Vcc and EN. I just need to connect 4 (Rx, Tx, GND, Vcc) to interface with Arduino?

tym3k zx lee7 months ago

Yes, you need only those 4 pins.

Miykoll made it!7 months ago

Great tutorial. Followed some other tutorials, but didn't get the communication working. Thanks man, you made my day :D

engereggae11 months ago

see my project with interface Serial arduino bluetooth android:

adityakushwaha11 months ago

is it necessary to use a max 232 to interface it with atmega 16?

Is there any problem with linking the vcc to the microcontroller's vcc, generally 5V, any consideration for current if needed? I dont know y but 3 of modules that i used after a few use got dead?

ehmedat12 months ago

If allowed possible code transmitter via Bluetooth

santan0071 year ago

Done the connections in exactly the same manner, also used the same sketch, still doesnt work for me. Neither with android nor TeraTerm.
Please help. What could be the possible problem?

Goines1 year ago

Great tutorial, definitely helped get my HC-05 working.

One question though; how do you get Windows to auto-reconnect to it? Once the power goes off on my HC-05 I have to delete the device and rediscover it. It seems that Windows doesn't want to repair with it. Are other devices different in this regard?

Thanks a lot

morinel1 year ago
Hi again, when I trying step 2, Why I faced this screen on TERA TERM: What should ó is?What is the meaning?
morinel1 year ago
Hi, While I am using this instructions, I faced an error. There is nothing on my TERA TERM screen, even though I connected my bluetooth module successfully. In the video, how can you see the writes:"Bluetooth On please press 1 or 0 blink LED" I can't see this sentence on my TERA TERM? Where is my faulty?
abharath1 year ago
A beautiful work sir! thank you ..and all the best!
1-40 of 47Next »