Skip to content

Instantly share code, notes, and snippets.

View ryansturmer's full-sized avatar

Ryan Sturmer ryansturmer

View GitHub Profile
{
"gun": 0,
"gco": 2,
"1ma": 0,
"2ma": 1,
"3ma": 2,
"4ma": 3,
"5ma": 4,
"6ma": 5,
"1sa": 1.8,
@ryansturmer
ryansturmer / mb.gdb
Created February 8, 2015 18:34
gdb script to print out the state of the G2 motion buffer pool
set logging on
set logging file mb.txt
print &mb.bf[0]
print mb.bf[0]
print &mb.bf[1]
print mb.bf[1]
print &mb.bf[2]
print mb.bf[2]
print &mb.bf[3]
print mb.bf[3]
@ryansturmer
ryansturmer / mb_analyze.py
Last active August 29, 2015 14:15
Analyzer for output of mb.gdb
import re
import sys
STATES = {
0 : 'EMPTY',
1 : 'PLANNING',
2 : 'QUEUED',
3 : 'PENDING',
4 : 'RUNNING'
}
util = require('util');
Interpreter = require('gcode').Interpreter;
var GCodeAnalyzer = function() {
Interpreter.call(this);
this.x = 0.0;
this.y = 0.0;
this.z = 0.0;
this.min_dist = 100000000000;
@ryansturmer
ryansturmer / TinyGv2.inf
Created March 19, 2015 18:54
TinyGv2.inf (Fixed for Windows 8.1)
[Strings]
DriverPackageDisplayName="TinyG USB Driver"
ManufacturerName="Synthetos (www.synthetos.com)"
ServiceName="USB RS-232 Emulation Driver"
due.bossa.name="Bossa Program Port"
due.programming_port.name="Arduino Due Programming Port"
due.sketch01.name="TinyG v2 (Control Channel)"
due.sketch02.name="TinyG v2 (Data Channel)"
due.original.name="Arduino (broken TinyGv2)"
@ryansturmer
ryansturmer / macro_3.sbp
Created April 16, 2015 13:23
Homing Routine
' HOMING ROUTINE
' RYAN STURMER
' WRITTEN FOR FABMO PLATFORM FOR A HANDIBOT
&approach_speed_fast = 1.0
&approach_speed_slow = 0.25
&search_distance_x = -8.0
&search_distance_y = -6.0
&backoff_x = 0.25
&backoff_y = 0.25
@ryansturmer
ryansturmer / topo.py
Last active August 29, 2015 14:24
DEM Converter
import re
class Topo(object):
def __init__(self, array, xscale=1.0, yscale=1.0):
self.array = array
self.w = len(array[0])
self.h = len(array)
minz = min(map(min, array))
self.maxz = max(map(max, array))-minz
self.minz = 0.0
@ryansturmer
ryansturmer / handibot.nc
Created August 20, 2015 14:50
V-Carve the text "Handibot" in times new roman
(VCarve File)
G0 Z0.2500
M4
G4 P3
G0 X0.1048 Y0.0044
G1 X0.1048 Y0.0044 Z-0.0031 F120.0000
G1 X0.1397 Y0.0437 Z-0.0278 F120.0000
G1 X0.2445 Y0.0480 Z-0.0340 F120.0000
G1 X0.4192 Y0.1354 Z-0.0957 F120.0000
G1 X0.5808 Y0.0568 Z-0.0401 F120.0000
@ryansturmer
ryansturmer / gofabmo.go
Created September 23, 2015 18:30
Console tool for finding FabMo tools on your network.
package main
import (
"bufio"
"fmt"
"net"
"os"
"time"
)
@ryansturmer
ryansturmer / configure_edison
Created October 9, 2015 02:40
configure_edison with better wifi management
#!/usr/bin/python
# Copyright (c) 2014, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU Lesser General Public License,
# version 2.1, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS