Making a Basic Raspberry Pi Security Camera! In this video I teach you how to use the Camera Module and PIR sensor to take motion triggered photos with your raspberry pi! Also, there will be no video next week due to travels. I'll see you soon!
_________________________________________________________________
Code:
import RPi.GPIO as GPIO
import time
from picamera import PiCamera
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.IN)
camera = PiCamera()
i=0
while True:
i+=1
state = GPIO.input(11)
if state==0:
print "We're clear"
time.sleep(0.1)
elif state==1:
print "STOP RIGHT THERE!"
camera.capture('/home/pi/PIR/pics/image{0:04d}.jpg'.format(i))
______________________________________________________________
Music:
Instrumental produced by Chuki: / chukimusic
En esta página del sitio puede ver el video en línea How to make a Basic Security Camera | Raspberry Pi de Duración hora minuto segunda en buena calidad , que subió el usuario Ethan's Pi Tips 27 julio 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 27,548 veces y le gustó 274 a los espectadores. Disfruta viendo!