Hacktoberfest-Raspberry-Pi
Hacktoberfest-Raspberry-Pi copied to clipboard
Create PIR motion
def take_photo(): global i i = i + 1 camera.capture('/home/pi/Desktop/image_%s.jpg' % i) print('A photo has been taken') sleep(10)
#assign a function that runs when motion is detected pir.when_motion = take_photo
pause()
//take picture when motion detected