Skip to content

Instantly share code, notes, and snippets.

@jbaiter
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbaiter/d816c28fe0a73086e1e5 to your computer and use it in GitHub Desktop.
Save jbaiter/d816c28fe0a73086e1e5 to your computer and use it in GitHub Desktop.
Laser plugin sketch
from spreads.plugin import HookPlugin, CaptureHooksMixin
class LaserPlugin(HookPlugin, CaptureHooksMixin):
def __init__(self, config):
self._counter = 0
self._interval = config['interval'].get(int)
def capture(self, devices, path):
counter += 1
if self._counter % self._interval != 0:
return
# Else, perform extra capture with lights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment