Skip to content

Instantly share code, notes, and snippets.

Avatar

Pete Prodoehl raster

View GitHub Profile
@xyzaxyz
xyzaxyz / Gcode_Translator.py
Created Apr 3, 2018
MP Scara 3D Printed Robotic Arm Cartesian To Scara GCode Translator Python Script
View Gcode_Translator.py
"""
@author: Tyler Williams
For use with the MPSCARA
Tested in, developed for, and funded by the Solheim Additive
Manufacturing Laboratory at the University of Washington, Seattle.
REQUIRES
settings.txt
Contains:
Machine Name:XXXX
View jigsaw.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Jigsaw puzzle</title>
<script type="text/javascript">
function save(filename, data)
{
var blob = new Blob([data], {type: "text/csv"});
View excuses.sh
#!/usr/bin/env bash
EXCUSES="/path/to/excuses.txt"
awk 'NR=='$((1 + $RANDOM % `nl $EXCUSES | tail -n 1 | awk '{print $1}' `))'{print;exit}' $EXCUSES
@outadoc
outadoc / pushover
Last active Jan 3, 2021
Pushover Bash Script
View pushover
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: ./pushover <message> [title]"
exit
fi
MESSAGE=$1
TITLE=$2
@aarongough
aarongough / tachometer.c
Created Sep 10, 2013
A simple Tachometer written for the Arduino. Uses a 'photo interruptor' on pin 3 as the input. The photo interruptor used was: https://www.sparkfun.com/products/9299 In combination with this breakout board: https://www.sparkfun.com/products/9322
View tachometer.c
#include <SoftwareSerial.h>
#include <serLCD.h>
int lcdTxPin = 2;
int tachPin = 3;
volatile int pulseCount = 0;
volatile unsigned long samplePeriodStart = 0;
volatile unsigned long pulsePeriod = 0;
unsigned long rpm = 0;
@atduskgreg
atduskgreg / photomosaic.pde
Created Jan 13, 2013
Processing tool to create a photomosaic from a directory of images. Thoroughly commented as part of a tutorial for @mathpunk.
View photomosaic.pde
// Create photomosaics from a source image and a directory of tile images.
// by Greg Borenstein, January 2013
// Read more here:
// see inline comments for more details
// -------------------------------------
// Import the java libraries we need.
// These are both utilites for sorting things.
@mathias
mathias / raster's drawbot
Created Jan 13, 2011
I made it possible to run the DrawBot by feeding it an array. Haven't tested since I don't have servos.
View raster's drawbot
/*
* Drawbot.pde
*/
#include <Servo.h>
Servo leftServo;
Servo rightServo;
int servoPinL = 9;
@voodoojello
voodoojello / boxcar-individual-notification.pl
Created Dec 13, 2010
Simple Boxcar User Notification using Library for WWW in Perl (LWP)
View boxcar-individual-notification.pl
#!/usr/bin/perl -w
#
# Simple Boxcar User Notification using Library for WWW in Perl (LWP)
# Author: mark page [m.e.page@voodoojello.net]
# Modified: Sun Dec 12 21:16:43 CST 2010
#
# expects Boxcar user sign-up address, *not* push.boxcar.io address as $ARGV[0]
#
use strict;
use warnings;
View Rotary Encoder
/**
* code to read one quadratic rotary encoder gray code.
*
* rights: http://tinyurl.com/by-sa-3-0
*/
int inputPin1 = 2; // A
int inputPin2 = 4; // B
int val1 = 0, val2 = 0;
int oldVal1 = 0, oldVal2 = 0;