How to Control Arduino by Bluetooth From (PC, Pocket PC PDA)





Introduction: How to Control Arduino by Bluetooth From (PC, Pocket PC PDA)

I wanted to make it possible to control an arduino board from my phone.
So that I could control other devices.
the easiest way seemed to be using bluetooth.

but when I received the parts needed I found it want quite as simple as I had hoped.
And after looking on the Internet I didn't find much information to help.

so I have decided to write this guide to help other people that are thinking of doing the same thing. 

Step 1: Parts Needed

1 arduino board ( I used the duemilanvoe 328)
1 bluetooth serial board ( I used the sparkfunbluesmirf)
some pieces of wire
1 led
A computer with bluetooth or a usb bluetooth adaptor.
A pocket PC with bluetooth

Software needed

the arduino enviroment software
and some serial terminal software ( I used putty)

Step 2: Wiring It All Up

I linked the cts1 to the rts0 on the bluetooth module.
then I wired the tx on the module to the rx on arduino
the rx on the bluetooth to the tx on arduino

I protected the bluetooth module by sealing it with heatshrink.

I then connected +5v and 0v to the bluetooth  board from arduino and supplied the arduino board with 5volts.

and pluged an LED in to socket pin 13 and ground to test it.

as shown.

Step 3: Loading the Software

Before I connected the board using bluetooth. I had to load some code on to the arduino board.

The easiest way to do this is to open the arduino enviroment software program and connect the board to a computer using usb.

then go to the tools tab and make sure the correct arduino board and usb ports are selected.

then up load this code on to the board.

this code will allow you to switch on and off the led by pressing 1 for on and 0 for off.
from your terminal.

simple LED test

char val;         // variable to receive data from the serial port
int ledpin = 2;  // LED connected to pin 2 (on-board LED)

void setup()
  pinMode(ledpin = 13, OUTPUT);  // pin 13 (on-board LED) as OUTPUT
  Serial.begin(115200);       // start serial communication at 115200bps
void loop() {
  if( Serial.available() )       // if data is available to read
    val =;         // read it and store it in 'val'
  if( val == '0' )               // if '0' was received led 13 is switched off

   digitalWrite(ledpin, LOW);    // turn Off pin 13 off
delay(1000);                  // waits for a second  
Serial.println("13 off");

if( val == '1' )               // if '1' was received led 13 on
    digitalWrite(ledpin = 13, HIGH);  // turn ON pin 13 on
    delay(1000);                  // waits for a second
    Serial.println("13 on");

Step 4: Connecting Over Bluetooth on the PC

the next step is to connect the arduino board using bluetooth.

disconnect the arduino usb cable and connect up the bluetooth module.

power the arduino board. and the red led on the bluetooth module should flash.

now open the bluetooth control panel on your pc this can be opened from the system control panel or from the icon in the bottom right of your desktop.

you will now have to add a new bluetooth device.
click my device is set up and ready to be found

then on the next screen to will see firefly-E754 or something similer. click next

on this screen select use the passkey found in the documentation and enter 1234.

on the last screen you will see which ports your computer assigns my computer set com11 for outgoing and com12 for incoming.

Step 5: Controlling From a Terminal in Windows

the next step is to connect to your arduino board using a terminal.

I used putty.

I selected the serial option and set the com port to 11 to match the bluetooth settings that my computer set.
then I set the baud rate to 115200. to match the baud rate in the code.

and clicked open

then the terminal window opens and the led on the bluetooth module turns green.

now when I press 1 the led will light up
and when I press 0 the led turns off.

Step 6: Controlling From a Pocket PC PDA

the priciples are basicly the same as connecting using a PC

On the pocket pc open the bluetooth manager and serch for new device.

when you see the Firefly-E754SPP connect to it.
enter the passkey 1234

then open pocket putty.

select serial put in the com port used on my PDA it's com6. set the baud rate speed to 115200.
and click open.

and the terminal should open the led will go green on the bluetooth module. and you will be able to send commands to your arduino.



  • Science of Cooking

    Science of Cooking
  • Trash to Treasure

    Trash to Treasure
  • Paper Contest 2018

    Paper Contest 2018

We have a be nice policy.
Please be positive and constructive.




i am tring to connect an android app with bluetooth hc05 but this message appear "unable to connection ,is the device turned on ?"

how can i fix this

thank you

first go to the bluetooth settings on your phone and connect to the reciver, put in the password(1,2,3,4) then go to bluetooth app

Hello, i have a noob question,to use the HC05 must i go through any initial set ups? i followed you intructions, my pc already have a built in bluetooth. i connected to the HC-05 uploaded the code onto my arduino, then used a separate power source for the Arduino . i made sure to connect to the sending COM and when i try to create a connection from arduino to BT it fails . gives me avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x59


This problem is really common, and easy to fix! :D This usually comes up when you're using a board other than the one selected in the arduino program. Just go tools>board>and select your board! :D


This problem is really common, and easy to fix! :D This usually comes up when you're using a board other than the one selected in the arduino program. Just go tools>board>and select your board! :D

Can anyone give me code for Bluetooth connection to the arduino device ????
I need it urgently
In C++, C#

It worked, thank you

Hi I am trying to get hold of the PocketPutty application for my HTC Mantle. The downlink link on the SurgeForce and other websites doesn't connect to the original PocketPutty site any more. It seems to be taken over by a Japanese owner with unrelated material to PocketPutty. Also other web sites claiming to have the application for download have just filled up my computer with unwanted maleware. Does anyone know where there is a safe down load for the application. It is open source under the BSD licence so redistribution could have been stored and made available from other websites. Regards in advance albertstc01

I have a question :

how to get the data from bluetooth module by arduino?

I have a question :

how to get the data from bluetooth module by arduino?