Skip to content

Instantly share code, notes, and snippets.

View nophead's full-sized avatar

Chris nophead

View GitHub Profile
@nophead
nophead / corner_orbit.scad
Last active March 21, 2017 13:06
Demo of corner orbit paths for laser engraving without stopping
paths = [ // a house
[[-50, 0], [-50, 80], [0, 120], [50, 80], [50, 0], [8, 0], [8, 30], [-8, 30], [-8, 0],[-50, 0]],
[[-40, 50], [-40, 70], [-20, 70], [-20, 50], [-40, 50]],
[[ 20, 10], [ 20, 30], [ 40, 30], [ 40, 10], [ 20, 10]],
[[ 20, 50], [ 20, 70], [ 40, 70], [ 40, 50], [ 20, 50]],
[[-40, 10], [-40, 30], [-20, 30], [-20, 10], [-40, 10]],
];
home = [-150, 150]; // where to start from
@nophead
nophead / lcr_meter_screen.scad
Last active March 28, 2016 15:31
Screening for Elektor 500ppm LCR meter LCD PCB.
//
// Elektor 500ppm LCR meter PCB PCB screen
//
$fa = 6;
$fs = 0.5;
thickness = 0.75;
pcb_clearance = 1.5;
pcb_width = 79;
pcb_length = 100;
Send: M105
Recv: ok T:17.2 /0.0 B:17.6 /0.0 T0:17.2 /0.0 @:0.00 B@:0.00
Send: M20
Recv: Begin file list
Recv: SQUARE.GCO
Recv: E3DFAN~1.GCO
Recv: E3DUST~1.GCO
Recv: S_GEAR~1.GCO
Recv: ATXSHORT.GCO
Recv: DMOTORX2.G
2014-10-23 16:58:02,141 - SERIAL - DEBUG - Enabling serial logging
2014-10-23 16:58:09,247 - SERIAL - DEBUG - Changing monitoring state from 'Operational' to 'Closed'
2014-10-23 16:58:13,303 - SERIAL - DEBUG - Connection closed, closing down monitor
2014-10-23 16:58:16,878 - SERIAL - DEBUG - Changing monitoring state from 'Offline' to 'Opening serial port'
2014-10-23 16:58:16,883 - SERIAL - DEBUG - Connecting to: /dev/ttyAMA0
2014-10-23 16:58:16,922 - SERIAL - DEBUG - Connected to: Serial<id=0x1ad8fb0, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=20.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2014-10-23 16:58:16,926 - SERIAL - DEBUG - Changing monitoring state from 'Opening serial port' to 'Connecting'
2014-10-23 16:58:36,974 - SERIAL - DEBUG - Send: M105
2014-10-23 16:58:37,000 - SERIAL - DEBUG - Recv: ok T:21.5 /0.0 B:21.1 /0.0 @:0%
2014-10-23 16:58:37,005 - SERIAL - DEBUG - Changing monitoring state from 'Connecting' to 'Operational'
set style data lines
set pm3d implicit
set hidden3d
set grid
set cntrparam levels auto 20
set xlabel "X"
set ylabel "Y"
set zlabel "mW"
set palette negative
set pm3d border
@nophead
nophead / coolometer.gnu
Last active February 2, 2016 16:35
Gnuplot script for displaying results from coolometer.py
set style data lines
set pm3d implicit
set hidden3d
set grid
set contour base
set cntrparam levels auto 20
set xlabel "X"
set ylabel "Y"
set zlabel "mW"
set palette negative
@nophead
nophead / coolometer.py
Last active February 1, 2016 12:20
Coolometer data gathering script
import serial
probe_z = 45
x_range = [-40, 40]
y_range = [-30, 60]
step = 2
def do_command(port,s): # send command and look for ok reply
while True:
port.write(s)