LED Control With Arduino

6,563

75

18

Posted in TechnologyArduino

Introduction: 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...

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...

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!

Share

Recommendations

  • Woodworking Contest

    Woodworking Contest
  • Casting Contest

    Casting Contest
  • Make it Move Contest

    Make it Move Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

18 Comments

How to write broken pipe
Show in app when I tab on any block
Why can u solve my problem please

"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?

1 reply

Just to learn blueooth interfacing... :P

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.

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

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.

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.

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

2 replies

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?

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

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

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