Basic motion detection using raspberry pi camera module Continually take photos and calculate the mean square difference between current and previous frames If this exceeds a threshold then store the images and record a short video