yobots
Published

Home Automation Using Bluetooth

In this project, you will learn how to make a home automation system for use with a smartphone through Bluetooth.

BeginnerShowcase (no instructions)2 hours4,457
Home Automation Using Bluetooth

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Relay board
×1
9V 1A Switching Wall Power Supply
9V 1A Switching Wall Power Supply
×1
Bluetooth module
×1

Story

Read more

Schematics

Home Automation Circuit Diagram

Code

Home Automation Arduino Code

Arduino
#include <SoftwareSerial.h>
SoftwareSerial mySerial (11, 12);
int pinNumber;
void setup() {
  mySerial.begin(9600);
 pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(15, OUTPUT);
  pinMode(16, OUTPUT);
  }

void loop() {
  while (mySerial.available())
  {
    pinNumber = mySerial.parseInt();
    digitalWrite(pinNumber , !digitalRead(pinNumber));    
  }
  // put your main code here, to run repeatedly:

}

Home Automation Arduino Code

Arduino
#include <SoftwareSerial.h>
SoftwareSerial mySerial (11, 12);
int pinNumber;
void setup() {
  mySerial.begin(9600);
 pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(14, OUTPUT);
  pinMode(15, OUTPUT);
  pinMode(16, OUTPUT);
  }

void loop() {
  while (mySerial.available())
  {
    pinNumber = mySerial.parseInt();
    digitalWrite(pinNumber , !digitalRead(pinNumber));    
  }
  // put your main code here, to run repeatedly:

}

Credits

yobots

yobots

1 project • 2 followers
I am an electrical engineer, I have done M.Tech in Renewable energy science. I am also a youtuber, I make DIY video.

Comments