Jithin Sanal
Published © Apache-2.0

Control your Home Devices using Arduino and Personal Assist

Let's use Arduino and Amazon's Alexa to create a home automation system that can be operated by speech.

IntermediateFull instructions provided1 hour330
Control your Home Devices using Arduino and Personal Assist

Things used in this project

Story

Read more

Schematics

Circuit

Code

Code

Arduino
#include "thingProperties.h"

void setup() {
  Serial.begin(9600);
  delay(1500);
  initProperties();
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();

}


void onBedRoomLightChange()  {
  if (bed_Room_Light == 1)
  {
    digitalWrite(5, HIGH);
    Serial.println(" Bed Room Light ON! ");
  }
  else
  {
    digitalWrite(5, LOW);
    Serial.println(" Bed Room Light OFF! ");
  }
}

void onStudyRoomLightChange()  {
  if (study_Room_Light == 1)
  {
    digitalWrite(5, HIGH);
    Serial.println(" Study Room Light ON! ");
  }
  else
  {
    digitalWrite(5, LOW);
    Serial.println(" Study Room Light OFF! ");
  }
}


void onStudyRoomFanChange()  {
  if (bed_Room_Light == 1)
  {
    digitalWrite(5, HIGH);
    Serial.println(" Study Room Fan ON! ");
  }
  else
  {
    digitalWrite(5, LOW);
    Serial.println(" Study Room Fan OFF! ");
  }
}


void onStairCaseLightChange()  {
  if (stair_Case_Light == 1)
  {
    digitalWrite(5, HIGH);
    Serial.println(" Stair Case Light ON! ");
  }
  else
  {
    digitalWrite(5, LOW);
    Serial.println(" Stair Case Light OFF! ");
  }
}

Credits

Jithin Sanal
84 projects • 325 followers
I am Interested in Arduino, Raspberry Pi, Ethical Hacking, Bash Scripting and Python programming.
Contact

Comments

Please log in or sign up to comment.