Вы находитесь на странице: 1из 5

6/12/2020 Control LEDs with your Android | Arduino-Bluetooth module tutorial – MechStuff

(https://mechstuff.com/)

MechStuff (https://mechstuff.com/)

Control LEDs with your Android | Arduino- (https://m


Bluetooth module tutorial leds-with
bl
tuto
(https://mechstuff.com/control-leds-with-your-
android-arduino-bluetooth-module-tutorial/)

You already know what we are gonna do today…so lets get started !

Things you’ll need :-


Arduino board
Breadboard
Bluetooth module/sensor – HC05
Couple of jumpers/single stranded wires
LEDs
An ANDROID(obviously 😛 )

VideoSpecial
tutorial
articlesdown below↓
& job alerts only for you Subscribers! Your email-id Subscribe  

https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/ 1/5
6/12/2020 Control LEDs with your Android | Arduino-Bluetooth module tutorial – MechStuff

Here’s a video tutorial which will surely make your job easy… 🙂

Tutorial on Bluetooth sensor HC-05 with Arduino | Connecti…


Connecti…

You may like –

Make an Obstacle avoiding robot using Ultrasonic sensor (in 10 mins)


(https://mechstuff.com/how-to-make-obstacle-avoiding-robot-using-arduino-ultrasonic-
sensor/)
Comment below if you face any difficulties. I’ll solve them for you ASAP

Share this Stuff :

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=facebook&nb=1)

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=jetpack-whatsapp&nb=1)

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=reddit&nb=1)

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=pinterest&nb=1)

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=twitter&nb=1)

 (https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/?share=linkedin&nb=1)  More

Related

(https://mechstuff.com/control-leds- (https://mechstuff.com/how-to-use- (https://mechstuff.com/how-to-make-


with-voice-command-arduino- motor-driver-l298n-arduino-tutorial/) obstacle-avoiding-robot-using-
bluetooth-module-tutoria/) How to use motor driver L298N - arduino-ultrasonic-sensor/)
Control LEDs with Voice Command | Arduino tutorial How to make obstacle avoiding robot
Arduino-Bluetooth module tutorial (https://mechstuff.com/how-to-use- using Arduino & Ultrasonic sensor ?
(https://mechstuff.com/control-leds- motor-driver-l298n-arduino-tutorial/) (https://mechstuff.com/how-to-
with-voice-command-arduino- August 4, 2019 make-obstacle-avoiding-robot-using-
bluetooth-module-tutoria/) In "Tutorials" arduino-ultrasonic-sensor/)
June 15, 2017 September 24, 2017
In "Robotics" In "Tutorials"

https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/ 4/5
6/12/2020 Control LEDs with your Android | Arduino-Bluetooth module tutorial – MechStuff

Connections Of Bluetooth module HC05 :-


VCC – to VCC of Arduino.
GND – to GND of Arduino.
RX – to digital pin 0(TX pin) of Arduino.
TX – to digital pin 1(RX pin) of Arduino. (connect RX & TX pin after uploading the code)

Of LED –
Positive terminal – to pin 8 of Arduino.
Negative terminal – GND of Arduino.

CONTROLLINO
100% Arduino-compatible

Unlimited exibility with up to 61 I/Os from


5V to 230V and countless interfacing
options
controllino.biz

OPEN

(https://i1.wp.com/mechstuff.com/wp-content/uploads/2016/12/ea1bf70c-b284-4f73-bd53-f1fc0c753843.jpg)

Connections of bluetooth module HC05 with Arduino

Procedure :-
1. Make the connections as shown in the above image. Don’t connect the RX & TX pins WHILE/BEFORE
uploading the code !
2. Copy the code given below.
3. Download the app called BlueControl (It’s free). Here is the link
(https://play.google.com/store/apps/details?id=com.gundel.bluecontrol&hl=es)

https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/ 2/5
6/12/2020 Control LEDs with your Android | Arduino-Bluetooth module tutorial – MechStuff
4. Open the app Blue control (It will automatically turn on the device’s Bluetooth). Go to options. Click on
“Connect to Robot”. Choose the device – HC 05.

CONTROLLINO
100% Arduino-compatible
Unlimited exibility with up to 61 I/Os from 5V to 230V and countless
interfacing options
controllino.biz

OPEN

5. When you are connecting to the Bluetooth module for the first time, it will ask you the password. Enter 0000
OR 1234.
6. When the device gets successfully paired with the sensor, the LED lights on sensor will start blinking at a
slower rate than usual.
7. DONE. Copy the code given below & test it out !

Code :-
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT); // put your setup code here, to run once:
}

void loop() {
// put your main code here, to run repeatedly:
if(Serial.available()>0)
{
char data= Serial.read(); // reading the data received from the bluetooth modu
switch(data)
{
case 'a': digitalWrite(8, HIGH);break; // when a is pressed on the app on y
case 'd': digitalWrite(8, LOW);break; // when d is pressed on the app on you
default : break;
}
Serial.println(data);
}
delay(50);
}

You may like it –

Control LEDs with Voice command (in 2 mins, just change code)
(https://mechstuff.com/control-leds-with-voice-command-arduino-bluetooth-module-
tutoria/)
 

https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/ 3/5
6/12/2020 Control LEDs with your Android | Arduino-Bluetooth module tutorial – MechStuff

 Tutorials (https://mechstuff.com/category/robotics/tuto/)  android (https://mechstuff.com/tag/android/),


Arduino (https://mechstuff.com/tag/arduino/), bluetooth module (https://mechstuff.com/tag/bluetooth-module/),
code (https://mechstuff.com/tag/code/), connections (https://mechstuff.com/tag/connections/), diy
(https://mechstuff.com/tag/diy/), how to (https://mechstuff.com/tag/how-to/), philips hue
(https://mechstuff.com/tag/philips-hue/), program (https://mechstuff.com/tag/program/), sensor
(https://mechstuff.com/tag/sensor/), smartphone (https://mechstuff.com/tag/smartphone/), testing
(https://mechstuff.com/tag/testing/)

CONTROLLINO
Unlimited exibility with up to 61 I/Os from 5V to 230V and
countless interfacing options

controllino.biz OPEN

https://mechstuff.com/control-leds-with-your-android-arduino-bluetooth-module-tutorial/ 5/5

Вам также может понравиться