ASHRU ABHIJIT PATTNAIK
Published © GPL3+

Voice Controlled Home Automation

In this project we can control a device by voice commands over Android APP. We use a Arduino MEGA board, but you can use any Arduino board.

IntermediateShowcase (no instructions)10 hours14,070
Voice Controlled Home Automation

Things used in this project

Hardware components

Arduino Mega 2560
Arduino Mega 2560
×1
HC-06 Bluetooth Module
×1
Relay (generic)
×2
Jumper wires (generic)
Jumper wires (generic)
×10

Software apps and online services

Android App

Story

Read more

Schematics

Voice controlled Ckt

I Connected 2 leds on PIn no 12 & 13 . You can connect 2 relays and control any appliances using this code. By modifing the code you can add any number of devices as per ur requirement.

Code

Voice controlled

Arduino
String readString;
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
while(Serial.available()){
  delay(3);
  char c = Serial.read();
  readString+=c;
}

if(readString.length() >0)
{
  Serial.println(readString);
  if(readString == "11")
  {
  digitalWrite(13, HIGH);
  }
 else if(readString == "12")
  {
  digitalWrite(13, LOW);
  }
   else if(readString == "21")
  {
  digitalWrite(12, HIGH);
  }
   else if(readString == "22")
  {
  digitalWrite(12, LOW);
  }
  readString = "";
}
}

Credits

ASHRU ABHIJIT PATTNAIK

ASHRU ABHIJIT PATTNAIK

4 projects • 54 followers
Hackster Live Ambassador

Comments