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
Nesta página do site você pode assistir ao vídeo on-line How to make a Basic Security Camera | Raspberry Pi duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Ethan's Pi Tips 27 Julho 2016, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 27,548 vezes e gostou 274 espectadores. Boa visualização!