Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views3 pages

Gesture Controlled Home Automation System-1

The Gesture-Controlled Home Automation System enables users to operate home devices like lights and fans through hand gestures using an ultrasonic sensor and relay modules. The setup involves components such as an Arduino, ultrasonic sensor, and relay module, with a detailed step-by-step guide for implementation. The provided code demonstrates how to detect hand movements and control devices accordingly.

Uploaded by

mdrifatjahan03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Gesture Controlled Home Automation System-1

The Gesture-Controlled Home Automation System enables users to operate home devices like lights and fans through hand gestures using an ultrasonic sensor and relay modules. The setup involves components such as an Arduino, ultrasonic sensor, and relay module, with a detailed step-by-step guide for implementation. The provided code demonstrates how to detect hand movements and control devices accordingly.

Uploaded by

mdrifatjahan03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Gesture-Controlled Home Automation System

Introduction:

The Gesture-Controlled Home Automation System allows users to control home devices like lights

and fans using hand gestures.

It uses an ultrasonic sensor to detect hand movements and relay modules to control devices.

Components Required:

1. Arduino (or ESP32)

2. Ultrasonic Sensor (HC-SR04)

3. Relay Module

4. Jumper Wires

5. Power Supply

6. Optional: Servo Motor (for mechanical movements like door opening)

Step-by-step Guide:

1. Arduino Setup:

- Use Arduino IDE to write the code.

2. Ultrasonic Sensor Setup:

- Connect the HC-SR04 ultrasonic sensor to Arduino to detect gestures.

3. Relay Module Setup:

- Use relay module to control home devices (light, fan).

4. Coding:

- Write code to trigger actions (like turning on/off devices) based on hand gestures detected by the

ultrasonic sensor.
5. Testing & Tuning:

- Test the project by moving your hand in front of the sensor to control the device.

Code:

#include <NewPing.h>

#define TRIGGER_PIN 9

#define ECHO_PIN 10

#define MAX_DISTANCE 200

#define RELAY_PIN 3

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

void setup() {

pinMode(RELAY_PIN, OUTPUT);

Serial.begin(9600);

void loop() {

delay(50);

int distance = sonar.ping_cm();

if (distance > 10 && distance < 30) {

digitalWrite(RELAY_PIN, HIGH); // Turn on the device

} else {

digitalWrite(RELAY_PIN, LOW); // Turn off the device


}

Serial.print("Distance: ");

Serial.print(distance);

Serial.println(" cm");

You might also like