Skip to content

Instantly share code, notes, and snippets.

Elliot Williams hexagon5un

Block or report user

Report or block hexagon5un

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View getESP32.sh
## This is where you want the entire toolchain to live
## You should run this script from within the destination directory, or
## redefine the BASE variable to fit your lifestyle.
BASE=$(pwd)
echo
echo [getESP32.sh]: Checking for system prerequisites
[[ $(which pacman) ]] && sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial wget 2>/dev/null
[[ $(which apt-get) ]] && sudo apt-get install git make libncurses-dev flex bison gperf python python-serial wget 2>/dev/null
@hexagon5un
hexagon5un / read-more-hackaday.hex
Created Sep 20, 2019
AVR/Arduino Hex Compiled Audio Experiment
View read-more-hackaday.hex
:100000000C9401010C941E010C941E010C941E0111
:100010000C941E010C941E010C941E010C941E01E4
:100020000C941E010C941E010C941E010C94ED0105
:100030000C941E010C941E010C941E010C941E01C4
:100040000C94A3010C941E010C941E010C941E012F
:100050000C941E010C941E010C941E010C941E01A4
:100060000C941E010C941E010000000025002800C5
:100070002B0000000000240027002A0004040404D0
:100080000404040402020202020203030303030342
:10009000010204081020408001020408102001021F
View gamma.py
## Creates a gamma-corrected lookup table
import math
def gamma(nsteps, gamma):
gammaedUp = [math.pow(x, gamma) for x in range(nsteps)]
return [x/max(gammaedUp) for x in gammaedUp]
def rounder(topValue, gammas):
return [min(topValue, round(x*topValue)) for x in gammas]
@hexagon5un
hexagon5un / hull.scad
Created Feb 4, 2018
OpenSCAD Hull Functions Library
View hull.scad
module multiHull(){
for (i = [1 : $children-1])
hull(){
children(0);
children(i);
}
}
module sequentialHull(){
for (i = [0: $children-2])
@hexagon5un
hexagon5un / gcodesender.py
Created Apr 15, 2019
gcodesender.py with "improved" defaults
View gcodesender.py
#!/usr/bin/python
"""\
Simple g-code streaming script
https://github.com/bborncr/gcodesender.py/blob/master/gcodesender.py
"""
import serial
import time
import argparse
@hexagon5un
hexagon5un / grbl_settings_steps.txt
Created Apr 15, 2019
GRBL Configs for 1 step/mm Eggbot
View grbl_settings_steps.txt
$100=1.000
$101=0.700
$102=100.000
$110=20000.000
$111=20000.000
$112=10000.000
$120=1500.000
$121=2000.000
$122=1000.000
$130=200.000
@hexagon5un
hexagon5un / grbl_settings_steps.txt
Created Apr 15, 2019
GRBL Configs for 1 step/mm Eggbot
View grbl_settings_steps.txt
$100=1.000
$101=0.700
$102=100.000
$110=20000.000
$111=20000.000
$112=10000.000
$120=1500.000
$121=2000.000
$122=1000.000
$130=200.000
@hexagon5un
hexagon5un / hull_pcb_case.scad
Created Feb 4, 2018
Create a PCB Caddy with OpenSCAD's hull() Command
View hull_pcb_case.scad
use <hull.scad>
w = 66.35;
l = 79;
pin_locations = [ [-w/2, -l/2, 0], [-w/2, l/2, 0],
[ w/2, -l/2, 0], [ w/2, l/2, 0] ];
thickness = 1;
$fn = 24;
@hexagon5un
hexagon5un / cube.py
Created Nov 15, 2018
Quick demo code for exploring the Supplyfrrame Cube
View cube.py
import serial
import os
s = serial.Serial("/dev/ttyUSB0", baudrate=115200, timeout=0.1)
# timeout: the cube seems to respond in 0.3 sec to "mtu" command
def send(command, s=s):
s.write(command + "\r")
def receive(s=s):
View Makefile_ARM_explicit
## Cross-compilation commands
CC = arm-none-eabi-gcc
LD = arm-none-eabi-gcc
AR = arm-none-eabi-ar
AS = arm-none-eabi-as
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
SIZE = arm-none-eabi-size
# our code
You can’t perform that action at this time.