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
In questa pagina del sito puoi guardare il video online How to make a Basic Security Camera | Raspberry Pi della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ethan's Pi Tips 27 luglio 2016, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 27,548 volte e gli è piaciuto 274 spettatori. Buona visione!