Introduction: LED Control With Arduino

Picture of LED Control With Arduino

This i'ble will help you control an LED with an app over bluetooth from your smartphone.

Step 1: Things You'll Need...

Picture of Things You'll Need...

An Arduino board.(An UNO would do, mine is a clone :p)

An LED.

A bluetooth module (HC05 or HC06).

A smartphone.

Step 2: Hook Things Up...

Picture of Hook Things Up...

Connect the LED to the 13th pin of the Arduino and ground.

Connect the Tx of the module to the Rx of the Arduino and the Rx of the module to the Tx of the Arduino.

Connect the 5v pin of the modue to the 5v of the Arduino and the ground of the module to the ground of the Arduino.

Step 3: Coding...

Upload the given sketch bluetoothlights.ino to your board.

Remember to remove the Tx and Rx pins before uploading.

Step 4: The App...

Download the apk and install it.

Make sure bluetooth is turned ON on your phone and that the bluetooth module is already paired with your device.

If it asks for a passkey it's 1234.

Step 5: Great! Finished.

Now you're good to go.

Open the app, connect your module, and enjoy!

Comments

carlos enriquel made it! (author)2017-01-12

PERFECTO PARA ENTENDER EL FUNCIONAMIENTO DEL HC05 seria muy bueno tener el codigo fuente del inventor, para realizar cambios

No sé cómo proporcionar el código fuente .. Si me dijera que usé el MIT APP INVENTOR

YLBright (author)2016-08-07

"This i'ble will help you control an LED with an app over bluetooth from your smartphone."

And why would I want to do this? Did I miss the real world application?

csilvester (author)YLBright2016-08-08

Just to learn blueooth interfacing... :P

csilvester (author)2016-08-05

Well... I wanted to upload the source code of the apk but unfortunately I don't know how to do so.

The apk basically sends a text over the bluetooth serial when any of those buttons are pressed.
For example pressing ON would send a "0" over bluetooth.
The arduino has a Serial.Read command which executes the given operation when it receives the specified text.

TUSHAR120701 (author)2016-07-30

you forgot something!

csilvester (author)TUSHAR1207012016-07-31

Please tell me what.

WillO4 (author)csilvester2016-08-01

There's usually a resistor in series with the LED to limit current flow.

csilvester (author)WillO42016-08-02

Well...this led has a forward resistance enough to limit the current.

The case may be different for you..

Anyways.. it's always better to keep a Res.

WillO4 (author)csilvester2016-08-02

Okay, looks like this LED works for your setup. Other LEDs will have a different forward voltage and current rating, so you may need a resistor in those cases.

csilvester (author)WillO42016-08-04

Ya, you're right.

VenkatakrishnanS (author)2016-08-01

For Arduino Uno Pin 13, No resistor is required. For Other pins Yes, it is required.

Heyup (author)VenkatakrishnanS2016-08-03

Hi guys, PIN 13 DOES require a resistor..... Thanks John... :)

I suppose that's not correct..I bricked my previous Arduino only because I kept a 'green' led without a CLResistor...

Or maybe you're right?

IlyasA1 (author)2016-07-31

source code apk ?

csilvester (author)IlyasA12016-08-01

Do you want the source code of the apk?... I did not understand your comment.
Well I made it from the MIT app inventor.

rbright (author)csilvester2016-08-01

on behalf of your fans .... 'Yes Please to Supplying Code'

csilvester (author)rbright2016-08-02

How do I supply the code if I used the AppInventor?

chrisjlionel (author)2016-08-01

Good & Instructive.

About This Instructable

6,215views

74favorites

License:

More by csilvester:LED control with ArduinoUltra-Portable Smartphone Charger!!!
Add instructable to: