How to control led light with android device using arduino and bluetooth module HC-05 - Download All Projects Programs And Diagrams For Free
Ads Here

Friday, 6 April 2018

How to control led light with android device using arduino and bluetooth module HC-05

How to control led light with android device using arduino and bluetooth module HC-05


Steps

1. connection- see the diagram and fit the connections.
























2. arduino connect with your pc and open arduino software .
3. copy this program and paste in arduino software


#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1);
int ledpin=13;
int Data;
void setup()
{
mySerial.begin(9600);
pinMode(ledpin,OUTPUT);
}
void loop()
{
if (mySerial.available())
{
Data=mySerial.read();
if(Data=='1')
{
digitalWrite(ledpin,HIGH);
mySerial.println("LED On! ");
}
else if (Data=='0')
{
digitalWrite(ledpin,LOW);
mySerial.println("LED Off! ");
}
}
}



4. remove bluetooths rxd and trd wires and upload the programe enjoy...................


      Watch project video..

No comments:

Post a Comment