0% found this document useful (0 votes)
18 views

Bluetooth Basics - How to Control an LED Using a Smartphone and Arduino

This document provides a tutorial on how to control an LED using an Android smartphone and Arduino via Bluetooth. It outlines the necessary components, connections, and steps to upload the code to the Arduino and install the Android application. The project serves as a foundation for more advanced applications like home automation and smartphone-controlled devices.

Uploaded by

Shahid Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Bluetooth Basics - How to Control an LED Using a Smartphone and Arduino

This document provides a tutorial on how to control an LED using an Android smartphone and Arduino via Bluetooth. It outlines the necessary components, connections, and steps to upload the code to the Arduino and install the Android application. The project serves as a foundation for more advanced applications like home automation and smartphone-controlled devices.

Uploaded by

Shahid Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Bluetooth Basics: How to Control an LED Using a

Smartphone and Arduino


by Mayoogh Girish

Interface an Android smartphone with an Arduino via Bluetooth to control an


LED from your phone.

PROJECT
Ever thought of controlling any of your electronic devices with your smartphone? How about
a robot or any other device? Would not it be cool to control them with your smartphone?
Here is a simple tutorial for interfacing an Android smartphone with Arduino via Bluetooth!

Android studio is not really required here, since I will provide you with the Android application
that I made. You can install the given .apk file to use the application.

How Does It Work

There are three main parts to this project. An Android smartphone, a Bluetooth transceiver,
and an Arduino.

HC 05/06 works on serial communication. The Android app is designed to send serial data to
the Arduino Bluetooth module when a button is pressed on the app. The Arduino Bluetooth
module at the other end receives the data and sends it to the Arduino through the TX pin of
the Bluetooth module (connected to RX pin of Arduino). The code uploaded to the Arduino
checks the received data and compares it. If the received data is 1, the LED turns ON. The
LED turns OFF when the received data is 0. You can open the serial monitor and watch the
received data while connecting.
Connecting the Arduino Bluetooth Hardware

This circuit is simple and small. There are only four connections to be made between the
Arduino and Bluetooth module!

Arduino Pins | Bluetooth Pins


RX (Pin 0) ———> TX
TX (Pin 1) ———> RX
5V ———> VCC
GND ———> GND

Connect an LED positive to pin 13 of the Arduino through a resistance (valued between
220Ω - 1KΩ). Connect its negative to GND, and you are done with the circuit!

You can connect the Bluetooth module to the Arduino using a set of jumper wires and a
connector.
Note: Do not connect RX to RX and TX to TX on the Bluetooth and Arduino. You will receive
no data. Here, TX means transmit and RX means receive.

Uploading the Sketch to Arduino

Upload the given sketch to Arduino using the Arduino IDE software, you can also get it from
Github.

Installing the Android Application

In this tutorial, I will not cover Android app development. You can download the Android
application from here and the source code of the entire project.
 Download the application from Amazon App Store or Github.
 Pair your device with the HC 05/06 Bluetooth module:
1. Turn ON the HC 05/06 Bluetooth module by powering the Arduino.
2. Scan your smartphone for available devices.
3. Pair your smartphone to the HC 05/06 by entering default password 1234 OR
0000.
 Install the LED application on your Android device.
 Open the application.

 Press "paired devices".


 Select your Bluetooth module from the list (HC-05/06)
 After connecting successfully, press the ON button to turn the LED on and the OFF
button to turn the LED off.
 Disconnect the button to disconnect the Bluetooth module.

Here is how it works!

This is just a basic tutorial on interfacing a Bluetooth module with Arduino. This project can
be taken to a higher level, like home automation using a smartphone, smartphone-controlled
robots, and much more! You can watch the video tutorial below:

https://youtu.be/azxshrFSgnA

You might also like