This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import picamera | |
def detect_motion(camera): | |
stream = io.BytesIO() | |
camera.capture(stream, format='jpeg', use_video_port=True) | |
# Detect motion in the captured image. Presumably one would need a prior | |
# image here to compare to ... this is left as an exercise for the reader! | |
from random import randint |