Skip to content

Instantly share code, notes, and snippets.


Richard Osterloh rosterloh

View GitHub Profile
rosterloh / covid-19.service
Created Mar 27, 2020
COVID-19 tracker on a PiminiTFT
View covid-19.service
Description=COVID-19 Tracker Service
ExecStart=/usr/bin/python3 /home/pi/CovidTracker/ --update 3600
View jupyter_lab.service
Description=Jupyter Notebook Service
ExecStart=/bin/sh -c "jupyter lab --ip= --no-browser"
rosterloh /
Created Jul 15, 2019
python png|bmp|csv oscilloscope_IP
#!/usr/bin/env python3
"""Take screen captures from DS1000Z-series oscilloscopes
This program captures either the waveform or the whole screen of a Rigol
DS1000Z series oscilloscope, then saves it on the computer as a CSV, PNG
or BMP file.
The program uses the LXI protocol, so the computer must have a LAN
connection with the oscilloscope.
if [ -z "$SCOPE_IP" ]; then
echo "Need to set SCOPE_IP"
exit 1
if [ -z "$1" ]; then
echo "Need to pass filename (without extension) as argument"
exit 1
#!/usr/bin/env bash
# 2019 Michael de Gans
set -e
# change default constants here:
readonly PREFIX=/usr/local # install prefix, (can be ~/.local for a user install)
readonly DEFAULT_VERSION=4.1.0 # controls the default version (gets reset by the first argument)
readonly JOBS=1 # controls the number of jobs
# (recommend leaving JOBS to 1 since each `cc1plus` process towards the end of
A CircuitPython 'multimedia' dial demo
Uses a ItsyBitsy M0 + Rotary Encoder -> HID keyboard out with neopixel ring
import time
import board
from digitalio import DigitalInOut, Direction, Pull
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
rosterloh /
Created May 30, 2019
OpenCV Edge Detector
Loads and displays a video.
# Importing OpenCV
import cv2
import numpy as np
# Create a VideoCapture object and read from input file
# If the input is the camera, pass 0 instead of the video file name
rosterloh /
Created May 28, 2019
CircuitPlayground Express Current Logger
# Set Circuit Playground Express flash chip to program writeable
# If toggle switch is right,
# flash is program writeable and file access is frozen
# If toggle switch is left,
# flash chip file access ok, file writes give an error
# via Dan Conley
# writing-to-the-filesystem
# 2018 Mike Barela for Getting Started with Circuit Playground Express
rosterloh / m5cam.yaml
Last active Oct 13, 2020
ESPHome for m5cam
View m5cam.yaml
name: m5cam
platform: ESP32
board: m5stack-core-esp32
ssid: "ssid"
password: "password"
# Enable logging
from machine import I2C, Pin
import ssd1306
import mpu6050
from simulation import Simulation
i2c = I2C(scl=Pin(5), sda=Pin(4))
display = ssd1306.SSD1306_I2C(128, 64, i2c)
accel = mpu6050.accel(i2c)
s = Simulation(accel, display)
You can’t perform that action at this time.