[go: up one dir, main page]

0% found this document useful (0 votes)
11 views3 pages

Iote 2

Uploaded by

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

Iote 2

Uploaded by

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

Experiment No.

2
AIM: IoT based LED control using Arduino and HC-05 .
Hardware Required:

Arduino nano 1
HC-05 1
Bread-Board 1
LED 1
Jumpers As required

Software required: Bluetooth Terminal(App)


THEORY:
The HC-05 is a popular module which can add two-way (full-duplex) wireless
functionality to your projects. You can use this module to communicate between
two microcontrollers like Arduino or communicate with any device with Bluetooth
functionality like a Phone or Laptop. There are many android applications that are
already available which makes this process a lot easier. The module
communicates with the help of USART at 9600 baud rate hence it is easy to
interface with any microcontroller that supports USART.
PROGRAM:
int led=8;
void setup() {
pinMode(8,OUTPUT);
Serial.begin(9600);
}
void loop() {
if (Serial.available()>0) {
char data=Serial.read(); //reading the data from the bluetooth module
switch(data)
{
case 'a':digitalWrite(8,HIGH); // Pressing 'A' will power the led
break;
case 'b':digitalWrite(8,LOW); // pressing 'B' will turn off the led
break;
default: break;
}
delay(100):
}
}
Connection :

RESULT: IoT based LED control using Arduino and HC-05.

You might also like