Instructables

ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino

Contest Winner
Picture of ArduDroid: A Simple 2-Way Bluetooth-based Android Controller for Arduino
HC-05 to arduino with divider.jpg

UPDATES:

REQUIREMENTS

  • Breadboard wiring and electronics skills.
  • Arduno Uno.
  • HC-05 Bluetooth serial module.


INTRODUCTION

ArduDroid (formerly Andruino) is a simple tool to help you control your Arduino (or clone) from your Android phone. It's both an Android app and an Arduino program. ArduDroid has a simple Android user interface to 1) control Arduino's digital and PWM pins 2) send text commands to Arduino 3) and receive data from Arduino over Bluetooth serial using the ever popular and really cheap (less than $10 from ebay) HC-05 Bluetooth over serial module. This app has been tested and designed for the HC-05 Serial Bluetooth module. Other Bluetooth modules may or may not work. Please see comments section for users who tried other Bluetooth modules with this app.

INSTALL FROM GOOGLE PLAY
https://play.google.com/store/apps/details?id=com.techbitar.android.Andruino

ArduDroid should work with other Bluetooth modules with some tweaking but I have only tested it with the HC-05. This is an alpha version that's running fine on my Samsung Galaxy S2 Plus. Please share your experience running ArduDroid on your phone. Also, while I used Arduino Uno in this prototype, feel free to experiment with other models of Arduino. Please share your experience to help me improve this app.

I have published a guide before on building and programming a circuit with the HC-05 Bluetooth module and Arduino but I will briefly describe again in this guide how to wire the circuit using a breadboard and jumper wires.

ArduDroid is an app that evolved during one of my development projects. Special thanks to engineer Jafar Quttaineh for testing the app and for his invaluable input.

 
Remove these adsRemove these ads by Signing Up
1-40 of 127Next »

Very nice project!!! Could you please send me the Android source code:
yangcheng111989@gmail.com
Thank you very much!!!

May I get the code so I can try this on my Windows Phone?

rcg_754 days ago

somebody HElp me. I am done with the 9Steps, But still my project not working. Thanks a lot

rcg_754 days ago

i am able to load the program in arduino via USB cable, from arduino 1.0.6

rcg_754 days ago

Hi techbitar good day! My arduino won't work. I am able to connect to HC-05 by my android phone. but when i press the 13, 12 to 02 its not functioning, it seems like cant communiacte to arduino ATmega168. GETdata is showing chars. SENDdata is sending chars.

Please help, i am stuck with this project...

mmáté17 days ago

Great! Easy setup and the test setup work immediately.

JohnN39 days ago

Hello, and thanks for sharing your great work. You have helped rekindle my interest after retiring from an electronics career. I am working on many projects that are basically remote controllers, and have successfully written "workable" apps using the MIT app inventor. I am new to all these technologies, but working through. Although my app works well after manually turning on the Bluetooth function on my smart phone, I'd like to be able to turn bluetooth on and off from the app as you do. I am having trouble understanding how that works. The only app writing I've done is with the MIT App Inventor. Can you offer any guidance as to how to achieve this. If you are aware and knowledgeable of MIT's App Inventor can it be written using the block editor, of must I first learn C? Thanks and enjoy your work as much as we do!

jvelasco51 month ago

I am new with interfacing arduino and android, this is very helpful!

Thank you and wonderful work!

Hello,

can you send the source code for android to me too? This would be very helpful for me. cac_fer@hotmail.com

Thank´s a lot

Can you please send me the source code for this android app on my mail please: juancarlosenlared@gmail.com

good job.

JohannesC13 months ago

Hello,

can you send the source code for android to me too? This would be very helpful for me.

Thanks

piotrlech3 months ago

Thanks a lot for your comprehensive description! Based on which I added a Real Time Clock and
433 MHz controlled sockets to my basic home automation. The source code of my
app is uploaded to https://code.google.com/p/haotc/.

arishy5 months ago

I hope it is not too late to comment on your wonderful work.

In the send part, it will be ideal to provide drop down to select from "programmed" text. By that I mean if you program the sketch to respond to specific text it is better to be "typed" correctly!!!.

Of course , you will add the function of "adding" to the drop down "combo box" selection. I hope you understand what I am suggesting.

When you provide us with code, we will be able to contribute to your work.

arishy5 months ago

I hope it is not too late to comment on your wonderful work.

In the send part, it will be ideal to provide drop down to select from "programmed" text. By that I mean if you program the sketch to respond to specific text it is better to be "typed" correctly!!!.

Of course , you will add the function of "adding" to the drop down "combo box" selection. I hope you understand what I am suggesting.

When you provide us with code, we will be able to contribute to your work.

proton3055 months ago

hi, your project works really fine, and I'll like to use it for my garden water system, but I need to customize the android app. Would you please share with me the eclipse source code ? thanks a lot

my email is proton305@gmail.com

proton305

craque5 months ago

I'm using the HC-06 BlueTooth module (I didn't understand the difference between HC-06 and HC-05; still don't). I got TechBitar's Android app and Arduino code to work without a flaw. Thanks TechBitar, now I have something I can work with.

Peter5605136 months ago

Like many others I think this is a great project. I'm just getting started and if I could have a copy of the source code for the Andriod app that would be appreciated. My email address is peter560513@gmail.com.

cgs16 months ago
If u have the source code than please do forward it to me Chanducgs123@gmail.com
mike_vasili9 months ago

hello... i have a an arduino mega 2560 a bluetooth module HC-05 and a galaxy s4. the problem is that, to watch the data received from the phone to the serial monitor of arduino i have to constantly press the reset button of the arduino. please help me...

can please someone help me? i am trying to do my final year project at the university

Me too. I need the code for my final year project!!!

cgs1 dbraganza6 months ago
If u have hot the source code than please do forward it to me

Chanducgs123@gmail.com
yardiansyah11 months ago
this is nice project..

can you send the source code for andorid, i want learn more..

send please at my email enshev92@gmail.com
cgs1 yardiansyah6 months ago
If u have hot the source code than please do forward it to me

Chanducgs123@gmail.com
sdavid26 months ago

Amazing!
mind sharing your android code? I like to customize it for a project of mine.

if you don't mind: Shachar_bd1@walla.com

thanks!

prash42135 made it!7 months ago

worked for me! thnx

IMG_20140428_221831.jpg
junti7 months ago

Hi very nice android app, can I have the source code? can I Modified it? I have a problem with my RC BLuetooth Project I want to control the DC Motor Speed but I really don't know how to make code both Arduino and Android app. like yours but if you share your source code of this maybe I can solve it. I'm using Servo for Left and Right control but only the speed did not control. if possible well you please send to my gmail account? here is my gmail junti20@gmail.com thanks for advance.

irajesh7 months ago

Very nice instructable. Thank you .. We are considering app development and want to know if ArduDroid is open source .. and if we can download it and do a modification to send and get data buttons to establish a different user interface ?

iHayri7 months ago

Thank you very much for this useful app. I tried all tutorials and apps I could find and yours is the only that did work and functions a described. I have a Arduino UNO v.3 and my bluetooth module is from a OBDII scanner that I never used until now and only the bluetooth chip from inside. All I had to do to make it communicate was to set the baud rate to 38400 and put the Key pin on low.

IMG_20140423_205508.jpg
mahf12307 months ago

Great instructables, and thanks for the source code and app, you ´re great.

I used the hc-06 and it work great.

thanks man

anatolanatol8 months ago

hello,

I modifies the sheck and now it works to arduino leonardo this is the code:

https://drive.google.com/file/d/0B_bdvgeAhBOJM2psR...

works to IDE 1.05....

gfreire578 months ago

He only works with the HC-05 Bluetooth serial module?

*Does it only works with the HC-05 bluetooth serial module?

ehmedat8 months ago

If allowed possible code transmitter via Bluetooth

bstott made it!8 months ago

Thank you very much for creating your lessons - bluetooth instructables. They were very helpful. Your tools were good for learning, connecting and verifying the bluetooth modules. My two devices: HC-05 & HC-06 to pair & connect. I did have a problem with phone pair sequence but, found it. They work!

Feature Request on your Android App:

Please provide selections for different data rates - 9600 (default), 38400, 57600, 115200 - ???.

Thank you again!

ArduDroid-testing.jpg
anatolanatol8 months ago

hello,

I used the code on several Arduino boards 1 and it works perfectly; now I wanted to use this board bought on ebay:

http://www.ebay.it/itm/181307172444?ssPageName=STR...

with micro ATMEGA32U4 (should be compatible with Arduino Leonardo).

but it does not work, someone can help me, is it necessary to modify something in Sheck??

pls help me

thanks

accio8 months ago

Hoping this can solve some of the problems: the code for Arduino uses "Serial" command (http://arduino.cc/en/reference/serial). This means that it communicates with HC05 via pin 0 and 1. Those pins are the same used to connect Arduino to the computer. [Looking at the reference of "Serial", maybe you have to introduce some changes to use it on a Leonardo]

If Arduino is attached to the computer via USB the data are passed to the USB and not to the bluetooth module.

Great project!

markie10 months ago
Hello TechBitar,

first of all Nice Project!
At the moment i am experimanting with this hc-05 module.
There is one thing i do not understand.

// 2a) select the requested pin# for DigitalWrite action
void set_digitalwrite(int pin_num, int pin_value)
{
switch (pin_num) {
case 13:
pinMode(13, OUTPUT);
digitalWrite(13, pin_value);
// add your code here
break;

If i just want to make a LED go ON or OFF, what do i fill in here?
i have been trying to get this to work all night but no succes so far.
Hope you can help me.

Greetz from the Netherlands!
Mark.
dbraganza markie9 months ago

I am a noob at this. But this is what my sir thought me. I don't think you need the integer pin-value. You could probably pass a string/char array. Either "HIGH" or "LOW". All in caps. HIGH is to switch the LED on. LOW is to switch the LED off.

digitalWrite(13,HIGH);\\Switched pin 13 LED on

digitalWrite(13,LOW);\\Switched pin 13 LED on

so you code shout be something like this

void set_digitalwrite(int pin_num, char pin_value[])
{
switch (pin_num) {
case 13:
pinMode(13, OUTPUT);
digitalWrite(13, pin_value);
break;

}

Let me know if it works.

gmosquera9 months ago
HI!! I LOVE YOUR TUTORIAL, it is amazing! Thank you so much!

I am working on my senior design project. Part of it is to receive and display data in an android device via bluetooth using arduino. Very similar to this instructable!

Since I'm an EE the arduino part is not too bad, the android part is where im facing difficulties.

Do you mind sending the android code to gabymosqueradiaz@gmail.com?

I would really appreciate it!

Thank you again!
Gaby
1-40 of 127Next »