Connecting an LED using Arduino and Android

Arduino and Android are two open-source powerful technologies. In this guide, you will understand more about the two technologies and understand in a simple way how to turn on a LED using the Arduino Uno microcontroller and a Smartphone running the Android operating system.

To develop projects with Arduino, you must keep in mind that there are many other support tools to make your work easier. There is a very useful tool in creating electrical schematics on protoboard, which makes Arduino projects much easier, and then takes the real implementation. This tool is Fritzing. you can download it from the link http://fritzing.org/download/

To Connect a LED with Arduino and Android will be used two programming platforms and some basic knowledge of electronics. Remembering that whatever your level of knowledge in terms of electronics and Arduino, as well as Android Smartphones, you are in a position to understand this guide.

Types of equipment to Connect a LED using Arduino and Android:

1 – Arduino Uno or any other that fits;

1 – 9V battery volts

1 – Protoboard;

1 – LED;

1 – Smartphone running Android OS ;

1 – 220 Ohms or 330 Ohms resistance;

1 – Bluetooth Card HC-06 or Xbee Bluetooth module;

Connection jumpers.

The Android IDE and Android Smartphone platforms will be used for this:

1 – The Arduino IDE to program the Arduino Uno.

2 –  An app called Arduino XBEE, which can be downloaded from the Google Play Store. If you prefer you can also develop your own app from App Inventor if so leave a comment asking for help in developing an app like this.

Hands-on:

Connecting an Arduino LED with Android:

1.      Creation of the electrical diagram:

Make a scheme that resembles what is in the figure below:

Ligar um LED com Arduíno e Android
Arduino and XBee Module connection diagram

Note that whatever your Bluetooth module may be used, just follow the following connection logic:

Arduíno

GND

5V

TX

RX

Xbee Module

GND

VCC

RX

TX

In this connection, you will be using the xBee Module as a Serial port, so it is necessary to bear in mind that when writing the program in our Arduino, you must disconnect the XBee Module since you cannot work with two serial communications in simultaneous, that is, Arduino loads the code while Xbee is being used.

Arduino Codes:

1-Transfer the following code to Arduino:

Arduino com android

2 – After creating the electrical diagram and transferring the code to the Arduino, install the Arduino BT Connect App, and follow the steps below to proceed with the Connecting a LED with Arduino and Android project:

  1. Turn on the Smartphone’s Bluetooth;
  2. Pair with Xbee Module;
  3. Open the Application and you will have a screen like this:
Arduino BT Connect
Arduino Xbee
  • Click Search for Arduino and select the Xbee Module from the list of available devices;
  • Note that where Arduino not connected is written it should be Arduino connected;
  • You can then send the following commands: a = LED ON and b = LED OFF.

Note that Arduino Xbee is a versatile application and can be used to send a variety of commands as long as these are reflected in your Arduino IDE code. Hope this article has been helpful in explaining how to Connect a LED with Arduino and Android.