Skip to content

Instantly share code, notes, and snippets.

View spikedrba's full-sized avatar

Spike spikedrba

View GitHub Profile
@spikedrba
spikedrba / gist:e8ba93dde66decca39e9
Last active August 29, 2015 14:20 — forked from waveform80/motion_215.py
Basic skeleton for picamera motion detection with circular buffer and recording
#!/usr/bin/env python
import io
import time
import picamera
import picamera.array
import numpy as np
from PIL import Image, ImageDraw
import io
import picamera
class MyOutput(object):
def __init__(self):
self.file_num = 0
self.output = None
def write(self, buf):
if buf.startswith(b'\xff\xd8'):