Skip to content

Instantly share code, notes, and snippets.

View rfb's full-sized avatar

Ryan Barber rfb

View GitHub Profile
#
# roland_plotter_flowcontrol.py
#
# chunks hpgl commands into 256 bytes. feeds plotters new chunks
# when there is available space.
#
# expects plotter at /dev/ttyUSB0 9600 8N1
#
# tested with a roland dxy-885
#
> rrdcreate temp.rrd DS:temp:GAUGE:30:-100:100 RRA:AVERAGE:0.5:1:1000
> rtl_433 -F "mqtt://localhost"
> mosquitto_sub -h localhost -t 'rtl_433/barley/events' | jq --unbuffered 'select(.id == 56 and .model == "Acurite-606TX") | .temperature_C' | xargs -I{} rrdtool update temp.rrd N:{}
> rrdtool graph temp.png DEF:temp=temp.rrd:temp:AVERAGE:step=1200 LINE1:temp#FF00FF:"Temp"
#!/usr/bin/env python3
import sys
ZERO_COUNT = 4
ONE_COUNT = 8
def ppm_scan(s):
count = 0
for bit in s:
@rfb
rfb / guix.scm
Created September 23, 2024 15:13
guix environment for launching qcad
(specifications->manifest
'( ;; Library Dependencies
"libsm"
"grep"
"bash-minimal"
"coreutils"
"gcc-toolchain"
"glib"
"gtk+"
))