Skip to content

Instantly share code, notes, and snippets.

View ednisley's full-sized avatar

Ed Nisley ednisley

View GitHub Profile
@ednisley
ednisley / Sewing Table Hinge Covers.scad
Created February 1, 2016 20:22
OpenSCAD Source Code: Sears Sewing Table Hinge Cover
// Vacuum Tube LED Lights
// Ed Nisley KE4ZNU January 2016
//- Extrusion parameters must match reality!
ThreadThick = 0.20;
ThreadWidth = 0.40;
HoleWindage = 0.2;
@ednisley
ednisley / Vacuum Tube Lights.scad
Last active February 2, 2016 01:26
OpenSCAD Source Code: Vacuum Tube Lights -- 3D Printed Tube Sockets
// Vacuum Tube LED Lights
// Ed Nisley KE4ZNU January 2016
Layout = "Sockets"; // Cap LampBase USBPort Socket(s)
Section = true; // cross-section the object
Support = true;
//- Extrusion parameters must match reality!
@ednisley
ednisley / MultiTube.ino
Last active February 2, 2016 01:25
Arduino Source Code: Vacuum Tube Lights -- Four Tubes Plus Plate Cap
// Neopixel lighting for multiple vacuum tubes
// Ed Nisley - KE4ANU - January 2015
#include <Adafruit_NeoPixel.h>
//----------
// Pin assignments
const byte PIN_NEO = A3; // DO - data out to first Neopixel
@ednisley
ednisley / Vacuum Tube Lights.scad
Created February 2, 2016 01:21
OpenSCAD Source Code: Vacuum Tube LEDs -- Ersatz Heatsink Plate Cap
// Vacuum Tube LED Lights
// Ed Nisley KE4ZNU January 2016
Layout = "FinCap"; // Cap LampBase USBPort Socket(s) (Build)FinCap
Section = true; // cross-section the object
Support = true;
//- Extrusion parameters must match reality!
@ednisley
ednisley / Improved Lipstick and Balm Holder.scad
Last active February 11, 2016 23:11
OpenSCAD Source Code: Improved Lipstick and Lip Balm Holder
// Lipstick and Balm Tube Holder
// Ed Nisley KE4ZNU - February 2016
//- Extrusion parameters - must match reality!
ThreadThick = 0.25;
ThreadWidth = 0.40;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
@ednisley
ednisley / KeyPad Events.py
Last active June 14, 2021 07:54
Python Source Code: Raspberry Pi USB Numeric Keypad -- evdev test
from evdev import InputDevice,ecodes,KeyEvent
k=InputDevice('/dev/input/keypad')
for e in k.read_loop():
if (e.type == ecodes.EV_KEY) and (KeyEvent(e).keystate == 1):
if (KeyEvent(e).keycode == 'KEY_NUMLOCK'):
continue # we don't care about the NumLock state
else:
print KeyEvent(e).scancode, KeyEvent(e).keycode
@ednisley
ednisley / StreamingPlayer.py
Created February 16, 2016 00:27
Python Source Code: Raspberry Pi Simple-minded Streaming Radio
from evdev import InputDevice,ecodes,KeyEvent
import subprocess32
Media = {'KEY_KP7' : ['mplayer','http://relay.publicdomainproject.org:80/classical.aac'],
'KEY_KP8' : ['mplayer','http://relay.publicdomainproject.org:80/jazz_swing.aac'],
'KEY_KP9' : ['mplayer','http://live.str3am.com:2070/wmht1'],
'KEY_KP6' : ['mplayer','http://pubint.ic.llnwd.net/stream/pubint_wamc'],
'KEY_KP1' : ['mplayer','-playlist','http://dir.xiph.org/listen/5423257/listen.m3u'],
'KEY_KP2' : ['mplayer','-playlist','http://dir.xiph.org/listen/5197460/listen.m3u'],
'KEY_KP3' : ['mplayer','-playlist','http://dir.xiph.org/listen/5372471/listen.m3u'],
@ednisley
ednisley / Vacuum Tube Lights.scad
Created February 19, 2016 15:22
OpenSCAD Source Code: Vacuum Tube Lights -- knurled inserts and hard drive platter chassis
// Vacuum Tube LED Lights
// Ed Nisley KE4ZNU February 2016
Layout = "Socket"; // Cap LampBase USBPort Socket(s) (Build)FinCap
DefaultSocket = "Noval";
Section = false; // cross-section the object
Support = true;
@ednisley
ednisley / Streamer.py
Created February 23, 2016 14:59
Python source code: Raspberry Pi Streaming Radio Player
from evdev import InputDevice,ecodes,KeyEvent
import subprocess32
import select
import re
import sys
Media = {'KEY_KP7' : ['Classical',['mplayer','-playlist','http://stream2137.init7.net/listen.pls']],
'KEY_KP8' : ['Jazz',['mplayer','-playlist','http://stream2138.init7.net/listen.pls']],
'KEY_KP9' : ['WMHT',['mplayer','http://live.str3am.com:2070/wmht1']],
'KEY_KP4' : ['Dub 1',['mplayer','-playlist','http://dir.xiph.org/listen/2645/listen.m3u']],
@ednisley
ednisley / Calibration Boxes.scad
Created April 3, 2016 15:11
OpenSCAD source code: Thinwall and solid boxes for 3D printer calibration
// Simple calibration boxes
// Thin wall open box - verify Extrusion Multiplier
// Solid box - verify infill settings
// Ed Nisley - KE4ZNU
// http://softsolder.com/
Layout = "Open"; // Open Solid
Texting = "Text!"; // text message on solid box or empty string to suppress