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
Sur cette page du site, vous pouvez voir la vidéo en ligne How to make a Basic Security Camera | Raspberry Pi durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Ethan's Pi Tips 27 juillet 2016, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 27,548 fois et il a aimé 274 téléspectateurs. Bon visionnage!