Shreyansh Jain J
Published © CC BY-NC-ND

HAVOC - Home Automation With Voice Control

This is VOICE based project which does automation on it own/user bases. It also has a smart security system and a voice update section.

AdvancedWork in progress8,720
HAVOC - Home Automation With Voice Control

Things used in this project

Hardware components

Intel Edison
Intel Edison
×1
SparkFun Sensor Kit
SparkFun Sensor Kit
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Servos (Tower Pro MG996R)
×1

Hand tools and fabrication machines

USB Camera
USB Hub
USB Sound Card

Story

Read more

Schematics

Servo Algorithm

Voice Commands Algorithm

Light Algorithm

Algorithm for light.

Web Algorithm

Algorithm for IP web camera.

Fan Algorithm

Algorithm for fan.

Code

Smart camera

Python
Connect PIR to A4,A5
#!/usr/bin/env python
import mraa		#importing mraa
import time		#importing time
import serial		#Importing serial

uart = mraa.Uart(0)	#Initialising Rx and Tx
ser =serial.Serial(uart.getDevicePath(), 9600, timeout=1)		#Initialising serial



x = mraa.Pwm(6)		#declaring pin 6 as pwn output for Servo
x.period_us(1000)	#defining time period
x.enable(True)		
value = 0.0		#Declaring value = 0
while True:
	z = mraa.Aio(5)	#Reading left PIR value
	y = mraa.Aio(4)	#Reading right PIR value

	if z.read() >=550:		#If motion detected at Left side



		x.write(0.0)		#Move servo to left
		time.sleep(3)		#Wait for 3 seconds





 	if y.read() >=550:		#If motion detected at Right side



			x.write(0.99)		#Move servo to right
			time.sleep(3)		#Wait for 3 seconds

	if (z.read()>550)and(y.read()>550):	#If motion detected at both left and right
			x.write(0.33)		#move to center
			time.sleep(3)		#Wait for 3 seconds

Github

IP web camera

Credits

Shreyansh Jain J

Shreyansh Jain J

1 project • 14 followers
Thanks to Navin B, drejkim, and A Srinivasan Sir.

Comments