LED Control With Arduino

7,333

83

18

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

Supplies:

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

  • IoT Challenge

    IoT Challenge
  • Woodworking Contest

    Woodworking Contest
  • Classroom Science Contest

    Classroom Science Contest

18 Discussions

0
None
NayanK10

1 year ago on Step 3

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

0
None
YLBright

2 years ago

"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
0
None
csilvester

2 years ago

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.

0
None
WillO4csilvester

Reply 2 years ago

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

0
None
csilvesterWillO4

Reply 2 years ago

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.

0
None
WillO4csilvester

Reply 2 years ago

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.

0
None
VenkatakrishnanS

2 years ago

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

2 replies
0
None
HeyupVenkatakrishnanS

Reply 2 years ago

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

0
None
csilvesterVenkatakrishnanS

Reply 2 years ago

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?

0
None
csilvesterIlyasA1

Reply 2 years ago

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

0
None
rbrightcsilvester

Reply 2 years ago

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

0
None
csilvesterrbright

Reply 2 years ago

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