KEMBAR78
IOT Program 2 Report | PDF
0% found this document useful (0 votes)
13 views3 pages

IOT Program 2 Report

This document provides instructions for controlling an LED using an HC-05 Bluetooth module with an Arduino. It includes a list of required components, circuit connections, and a step-by-step guide for setup and code uploading. The source code for the Arduino is also included, which allows the LED to be turned ON or OFF via an Android app after pairing with the Bluetooth module.

Uploaded by

sumukha1872008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

IOT Program 2 Report

This document provides instructions for controlling an LED using an HC-05 Bluetooth module with an Arduino. It includes a list of required components, circuit connections, and a step-by-step guide for setup and code uploading. The source code for the Arduino is also included, which allows the LED to be turned ON or OFF via an Android app after pairing with the Bluetooth module.

Uploaded by

sumukha1872008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Program 2: CONTROL A LED USING HC-06 BLUETOOTH MODULE

WITH Arduino Android Bluetooth

Components required

1. Arduino Uno
2. Breadboard
3. Jumper Wires
4. USB Cable
5. HC-05 Bluetooth
6. LED
7. Arduino Bluetooth connector APP

Circuit Connections
HC-05 ARDUINO
VCC 5V/Vin
GND GND
TXD RX
RXD TX

LED ARDUINO
Anode (+) PIN 13
Cathod (-) GND
Circuit Diagram:

Steps:
1. Connect the HC-05 Bluetooth with Arduino and LED with Arduino similar
to the above diagram.
2. Upload the code to the board.(Note: Disconnect the Rx and Tx before
uploading the code to the board)
3. After uploading the code then connect RX and Tx to the Arduino board.
4. Install the app “Arduino Bluetooth Controller” from Play store in
Android mobile.
5. Pair the HC-05 and set the values of LED to 0 and 1 using settings.
6. LED will be OFF/ON using Android mobile.
Source Code:
char Incoming_value = 0;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}

void loop()
{
if(Serial.available() > 0)
{
Incoming_value = Serial.read();
Serial.print(Incoming_value);
Serial.print("\n");
if(Incoming_value == '1')
digitalWrite(13, HIGH);
else if(Incoming_value == '0')
digitalWrite(13, LOW);
}
}

You might also like