Program Your Arduino With an Android Device Over Bluetooth

129,399

591

68

Introduction: Program Your Arduino With an Android Device Over Bluetooth

About: I am Bluino Electronics.

Hello world, in this Instructable I want to show you, how to program your Arduino Uno with your Android device over Bluetooth. It is very simple and so cheap. Also it allows us to program our Arduino where ever we want over wireless bluetooth... So lets get started! :)

Step 1: Materials and Tools

Hardware :

  • Arduino Uno
  • Bluetooth HC-05 module
  • Mini breadboard
  • Capacitor 1uf/50v (elco)
  • Reasisor 100 ohm
  • 5 pcs x Jumper wires
  • USB cable
  • Android device with Android 4.0.0+ (Bluetooth available)
  • Laptop/PC

Software :

  • Bluino Loader from the Google Play store

Step 2: Program Your Arduino Using Laptop/PC

Start by copying the code from text box below.
Then, copy and paste the code into the Arduino IDE editor. Compile. Upload.

This code contains several functions to change the parameters of Bluetooth HC-05 :

  • AT+NAME=Bluino#00 : Change name of bluetooth module, default name is "HC-05".
  • AT+UART=115200,0,0 : Change baud rate to 115200 (Arduino Uno, Bluino and Mega2560)
  • AT+UART=57600,0,0 : Change baud rate to 57600 (Arduino Nano, Leonardo, Micro, Pro Mini 3V3/5V and Duemilanove)
  • AT+POLAR=1,0 : Change state pin conditio
  • For additional you can change password to use not standard password while pairing, AT+PSWD=xxxx.

Name of bluetooth must "Bluino#00-9999", if you want custom name you should use the paid version of Bluino Loader App.

void setup() {
  Serial.begin(38400);
  delay(500);   
  Serial.println("AT+NAME=Bluino#00");
  delay(500);
  Serial.println("AT+UART=115200,0,0"); // Use this baudrate if using for Arduino Uno, Bluino and Mega2560
//Serial.println("AT+UART=57600,0,0");  // Use this baudrate if using for Arduino Nano, Leonardo, Micro, Pro Mini 3V3/5V and Duemilanove
  delay(500);
  Serial.println("AT+POLAR=1,0")
  delay(500);
}

void loop() {
}     

Step 3: Hook Up Like Schematic

Following the above image, the layout is relatively simple.

If you want you can replace breadboard with PCB prototype board with some soldering work, so you get small size or like shield for Arduino.

Step 4: Time to Setup Bluetooth HC-05

Basically in this step how to setup HC-05 over At command, with following this step you will set HC-05 to some parameters.

In step 2 you have upload sketch to Arduino, in that code have Serial function to communicate over pin RX/TX (D0/D1), which is when you connect to HC-05 pin RX/TX is will force setup HC-05 on At command mode. Just follow step like on pictures.



• Press and hold KEY button
• Plug USB cable for powering Arduino
• Wait about 5 second (still hold KEY button)
• Unplug and re plug USB for reset from AT command mode


Step 5: Install Application Bluino Loader From Googleplay Store

Okay, the first app I want to show you is "Bluino Loader", for Andorid 4.0 or higher with available bluetooth connection. You can get from googleplay store :

Bluino Loader - Arduino IDE or Pro version to support developer Bluino Loader Pro - Arduino IDE

This app is for working with the Arduino Uno, you can write, edit and upload sketches to Arduino uno over bluetooth HC-05. The app is easy to understand like Arduino IDE, there are many examples sketch, also you can add some libraries just copy paste library folder to folder BluinoLoader/libraries. You can change of theme of editor color, size of text and many features. If you want get Serial Monitor feature, removed Ad and can scan any name of bluetooth (Not only Bluino#...) you can buy feature in-app purchase, so also support developer.

Uploading a sketch worked very good over Bluetooth! So I would give this app 4.0 out of 5 stars :)

Step 6: Try Upload Sample Sketch Blink.ino Into Arduino Using Android Device Over Bluetooth

  • After finish installed you can open example sketch BluinoLoader/examples/02.Basic/Blink/Blink.ino
  • Wait until extracting tools finished
  • Tap on "upload" button (Arrow in the circle icon)
  • After done compiling no error, tap button "Scan Bluino Hardware" to search active bluetooth
  • Pick bluetooth hardware with name "Bluino#00"
  • If first pairing enter pairing code standard "1234", then OK
  • Wait until process uploading done

After all step OK your Arduino will blink on led 13, and you can repeat all the steps to upload another sketch.

Makerspace Contest

Participated in the
Makerspace Contest

3 People Made This Project!

Recommendations

  • For the Home Contest

    For the Home Contest
  • Game Design: Student Design Challenge

    Game Design: Student Design Challenge
  • Big and Small Contest

    Big and Small Contest

68 Comments

4
rahul4040261
rahul4040261

Question 2 years ago

I have shown error is " error uploding" what i can do ?

Screenshot_20200326_174915.jpg
0
elilevi153
elilevi153

Answer 3 months ago

Hi.did you solve the problen "error uploading " since than a lot of time passed ,but unfortunetly i have the some problem.please help

0
leandrotec1
leandrotec1

1 year ago on Step 2

Existe um pequeno erro no código.
Falta o ponto e vírgula " ; " no final
Serial.println("AT+POLAR=1,0");

0
leon
leon

1 year ago

Hola, no hay manera de poder cargar el codigo en arduino..... me dice lo siguente

error de codigo.jpg
0
leon
leon

1 year ago

Hola ,por favor ayuda !!! no puedo cargar el codigo en arduino me da error

error.jpg
3
lewismurimi
lewismurimi

Question 3 years ago on Step 6

hello there, great project but when i try when i try uploading a sketch, i get "no usb connected" message on myphone. what could be the mess or do i really need the pro version of the bluino loader coz m using the trial free version?

0
Bambang prayogi
Bambang prayogi

Answer 2 years ago

Just use Uno r3 board

3
rahul4040261
rahul4040261

Question 2 years ago

When i upload the program than error uploading is show. Pls give me process what i can do ? Pls

Screenshot_20200406_113406.jpg
0
aldinobangkit
aldinobangkit

Answer 2 years ago

Same problem

2
capo284
capo284

2 years ago

How i can use external libraries? Thanks

0
rahul4040261
rahul4040261

2 years ago

I connect 100 ohm and 16v, 1uf capacitor as you mentioned but When i uploading blinking program , Hc-05 stop red lighting about 2 sec. Then blicking it , but arduino not respond any type of program what i can do please response me ...

1
bluino_electronics
bluino_electronics

Reply 2 years ago

Check and make sure your Bluetooth HC-05 is configured, especially AT+BAUD=115200,0,0 and AT+POLAR=1,0

1
rahul4040261
rahul4040261

Reply 2 years ago

How i can check that ?

1
rahul4040261
rahul4040261

Question 2 years ago

Where uploading is done but arduino not respond any type of program like basic blinking , when i supply arduino TX led is turn on some little duration, RX led not any blicking provide... Pls help

1
palomen
palomen

3 years ago

Does this works for ATMega32U4 Arduino like devices?
I have an Arduino pro micro and I'm still not able to programming it with the bluino app.
I think it has something to do with the boot time of the uC.

0
officialahmetofficial
officialahmetofficial

Reply 3 years ago

its some kind bluetooth to rs232 interface emulation , like usb to serial converter devices, mostlikeliy will work with allmost any serially programmable/communicable device .

1
Gadisha
Gadisha

3 years ago

Hello, is it possible to control boards like Lilypad or Adafruit Flora with this IDE?

0
Gadisha
Gadisha

Reply 3 years ago

P. 's. - or Arduino nano every.

1
Smith1896
Smith1896

Question 3 years ago on Introduction

Please, i would like more information cause i am confused, i purchased the pro-version of bluino android app, my account has been deducted but i have not seen anu vjange in the app features, especially the serial monitor which is of urgent need to me right now, i would appreciate any help rendered.. Thanks