गुरुवार, 8 अप्रैल 2021

arduino based voice control home automation ..

 download circuit and code and android app....
1. voice control android app link-https://drive.google.com/drive/folders/1JsOYFbFTBohRFdC0Ins6f8khoelZj6Ce?usp=sharing
2. circuit diagram-




4. watch video for more details..




5. download code complete code..


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

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

if(voice.length() >0)
{
  Serial.println(voice);
  if(voice == "turn on LED")
  {
  digitalWrite(12, HIGH);
  }
 else if(voice == "turn off LED")
  {
  digitalWrite(12, LOW);
  }
   else if(voice == "turn on fan")
  {
  digitalWrite(11, HIGH);
  }
   else if(voice == "turn off fan")
  {
  digitalWrite(11, LOW);
  }
  voice = "";
}

}


plz like and share this tutorial.

कोई टिप्पणी नहीं:

एक टिप्पणी भेजें

3.5 " TFT LCD shield

                                                                                                                                            ...