Skip to content

Instantly share code, notes, and snippets.

benemorius / wiegand-rpi.txt
Last active January 10, 2022 08:32
wiegand-rpi parts
relay $0.35
relay fet $0.03
relay diode $0.01
relay output polyfuse 750mA $0.06
wiegand 12v output polyfuse 750mA $0.06
wiegand input zener $0.03
total cost (just for those parts) for an 8 channel board: $4.16
no excuse anymore for using 8-bit $1.05

python3 -m venv venv # maybe need apt install python3-venv

. venv/bin/activate

pip -r requirements.txt

benemorius /
Last active August 27, 2020 20:32
install script for raspberry-wifi-conf
# run these commands as root to install raspberry-wifi-conf on any pi zero through 4
# update apt and install npm and git
apt update
apt install npm git -y
# install bower
npm install bower -g
benemorius /
Created November 12, 2019 01:51
configure a raspberry pi for a kw41z-slip module
set -x
# This script enables the UART and disables kernel output and getty on it
# and installs OpenOCD from source and compiles RIOT from source and flashes
# the gnrc_border_router example onto a kw41z-slip module.
# It takes about 5 minutes on rpi4 up to maybe an hour on rpi0.
# A reboot is required if /dev/serial0 isn't already enabled.
benemorius /
Created February 6, 2017 18:46
receives data from Argent 80422 and other sensors and sends it to Weewx over UDP
import threading
import Adafruit_ADS1x15
import RPi.GPIO as GPIO
import time
from datetime import datetime
import json
import socket
import Adafruit_BMP.BMP280 as BMP280
benemorius /
Created February 6, 2017 18:44
generic Weewx station driver listens on a UDP port for JSON weather sensor data
from __future__ import with_statement
import math
import time
import json
import socket
import weedb
import weewx.drivers
import weeutil.weeutil
iwpan phy0 set channel 0 11
iwpan dev wpan0 set pan_id 0x777
ip link add link wpan0 name lowpan0 type lowpan
ifconfig wpan0 up
ifconfig lowpan0 up
(load (build-path geda-rc-path "gschem-colormap-lightbg"))
(load (build-path geda-rc-path "print-colormap-lightbg"))
(output-color "enabled")
;(undo-panzoom "disabled")
;(zoom-with-pan "disabled")
(fast-mousepan "disabled")
;(scroll-wheel "gtk")
(warp-cursor "disabled")
2014-11-11 12:30:38,670 - [1] DHT - INFO - Trying handshake with new peer: "Default" tcp://<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" >
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<link rel="icon" type="image/ico" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/baseINID.css" />
<link rel="stylesheet" type="text/css" href="/INID.css" />
<script language="javascript" type="text/javascript"><!--
function isWinIE6() {
Traceback (most recent call last):
File "/usr/lib64/python2.7/", line 810, in __bootstrap_inner
File "/usr/lib64/python2.7/", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "node/", line 45, in get_history
history = bitcoin.history(addr)
File "/home/stilwellt/projects/OpenBazaar/env/lib/python2.7/site-packages/bitcoin/", line 114, in history
(addr, offset))
File "/home/stilwellt/projects/OpenBazaar/env/lib/python2.7/site-packages/bitcoin/", line 21, in make_request