Skip to content

Instantly share code, notes, and snippets.

View JoppeSchwartz's full-sized avatar

Joe Schwartz JoppeSchwartz

View GitHub Profile
#!/usr/bin/env python
#
# (C) 2014 Joe Schwartz & Square Design, Inc.
#
# Uses the image from a webcam to control a grid of 32 Neopixel strips with 48
# pixels on each strip.
#
import signal
import sys
import numpy as np
@JoppeSchwartz
JoppeSchwartz / boxer.py
Last active September 8, 2022 18:05
Given a set of latitude-longitude coordinates representing a route, this module will create a set of bounding boxes.
# module boxer.py
#
# Given a set of latitude-longitude coordinates representing a route, this module will
# create a set of bounding boxes, accessible via the boxes property.
#
import math
from pprint import pprint
class coordinate:
@JoppeSchwartz
JoppeSchwartz / MeasureBrightness.m
Created July 19, 2014 19:32
Measure brightness with the iOS front camera.
/* Assumes your class has the following instance variables:
AVCaptureSession *_videoSession;
AVCaptureDevice *_cameraDevice;
AVCaptureStillImageOutput *_imageOutput;
AVCaptureConnection *_avConnection;
*/
-(void) setupStillVideoCaptureSession