Interfacing "Bluetooth Module" with Arduino Uno
Materials required-:
- Arduino Uno Board
- Bluetooth Module (JDY-30)
- Breadboard
- Led (as per your choice)
- jumpers
- Resistors (220 ohm )
Hey guys, This is our 10th project using "Arduino Uno" in this project I'm gonna show you how you can connect to a Bluetooth module and operate led . This is the similar concept used in "Home Automation" projects in upcoming posts I will show you how you can make your own Home automation system. If you guys have any doubts you can contact me through email or contact us form in menu.
If you want me to make a project based on your ideas just let me know in the comment section.
HAPPY LEARNING!
int Roof_light=13;
int Left_Fan=12;
int left_Light=11;
int Night_Bulb=10;
int Right_light=9;
int Right_Fan=8;
void setup()
{
Serial.begin(9600);
pinMode (Roof_light, OUTPUT);
pinMode (Left_Fan, OUTPUT);
pinMode (left_Light, OUTPUT);
pinMode (Night_Bulb, OUTPUT);
pinMode (Right_light, OUTPUT);
pinMode (Right_Fan, OUTPUT);
}
void loop()
{
int c = Serial.parseInt();
//Roof_light
if (c==1)
{
digitalWrite(Roof_light, HIGH);
Serial.println("Roof_light ON");
}
else if(c==2)
{
digitalWrite(Roof_light, LOW);
Serial.println("Roof_light OFF");
}
//Left_Fan
else if (c==3)
{
digitalWrite(Left_Fan, HIGH);
Serial.println("Left_fan ON");
}
else if(c==4)
{
digitalWrite(Left_Fan,LOW);
Serial.println("Left_Fan OFF");
}
//left_Light
else if (c==5)
{
digitalWrite(left_Light,HIGH);
Serial.println("left_Light ON");
}
else if(c==6)
{
digitalWrite(left_Light, LOW);
Serial.println("left_Light OFF");
}
//Night_Bulb
else if (c==7)
{
digitalWrite(Night_Bulb,HIGH);
Serial.println("Night_Bulb ON");
}
else if(c==8)
{
digitalWrite(Night_Bulb, LOW);
Serial.println("Night_Bulb OFF");
}
//Right_light
else if (c==9)
{
digitalWrite(Right_light,HIGH);
Serial.println("Right_light ON");
}
else if(c==10)
{
digitalWrite(Right_light, LOW);
Serial.println("Right_light OFF");
}
//Right_Fan
else if (c==11)
{
digitalWrite(Right_Fan,HIGH);
Serial.println("Right_Fan ON");
}
else if(c==12)
{
digitalWrite(Right_Fan, LOW);
Serial.println("Right_Fan OFF");
}
}
Now before uploading the code detach Bluetooth module with Arduino and then upload the code after uploading the code you can attach the Bluetooth module . Next part is to download the application for Bluetooth module you can also use MIT inventor website where you can create your own application but here I have used "Serial Bluetooth Terminal " its easy to use application. what you all have to do is
to choose correct value of button which is defined in the code you can also use your own configuration.
I know this code looks like home automation system code's and yeah ,it is actually I have made my home automation using this code and you can also build your own just by using this code what you all have to do is to use "Relay Module " (I have made my own relay module you can check previous post on this )in the place of led then digital pins will trig the relays which will act as a switch (you have to
connect relays parallel to switch).
If you don't wanna do this you can just stay tuned and in upcoming projects I will show you how you can make your own "Home Automation Project".
For any queries contact me on -:tombriddle28@gmail.com
YouTube Channel-: Omnific{If this post helps you please do subscribe my
YouTube channel too ,It's only a click for you but it means a lot to me.}

Comments