Things used in this project

Hardware components:
Intel Edison
12797 01
SparkFun Sensor Kit
Bluetooth module HC-05
Servo (generic)
Hand tools and fabrication machines:
USB Camera
USB Sound Card


Servo Algorithm
Servo algorithm of web camera
Voice Commands Algorithm
Voice command algorithm
Light Algorithm
Algorithm for light.
Lighting system algorithm
Web Algorithm
Algorithm for IP web camera.
Web camera algorithm
Fan Algorithm
Algorithm for fan.
Fan system algorithm


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
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 >=550:		#If motion detected at Left side

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

 	if >=550:		#If motion detected at Right side

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

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


Thanks to Navin B, drejkim, and A Srinivasan Sir.


Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback


Similar projects you might like

Flying Manatee
  • 203
  • 5

The Flying Manatee flaps its wings in reaction to motion. It's a great project to get you started with simple DIY maker projects.

DIY Nespresso Capsule Detector
  • 1,397
  • 8

Full instructions

If there’s one thing that we geeks love, it’s coffee.

Smart City Tree Management
  • 232
  • 5


Smart City Tree Management uses sensors to monitor wellness of the trees to combat air pollution as well as sound pollution.

Drone Pi: A Windows 10 Raspberry Pi Drone
  • 1,703
  • 15

Work in progress

A cool drone controlled by a raspberry pi, a windows 10 device and an xbox one controller.

Office Neighbor Shield with Arduino
  • 608
  • 4

In the following project, we'll show you how to make an Arduino-controlled office neighbor shield.

Ball Tracking
  • 1,455
  • 6

Full instructions

Colored ball object tracking.

ProjectsCommunitiesContestsLiveJobsFree StoreBlogAdd projectSign up / Login
Respect project