Processing code for a photo frame that controls playback of cinemagraphs by using a tilt sensor + raspberry pi