Skip to content

Instantly share code, notes, and snippets.

View raster's full-sized avatar

Pete Prodoehl raster

View GitHub Profile
@raster
raster / TeensyTwoButtons.ino
Last active October 4, 2015 14:08
Simple two button control with a Teensy
/*
* TeensyTwoButtons.pde
*
* You must select Keyboard from the "Tools > USB Type" menu
*
* Download and install the Bounce library: http://www.pjrc.com/teensy/td_libs_Bounce.html
*
*/
#include <Bounce.h>
@raster
raster / TeensyTwoButtons2.ino
Last active October 4, 2015 21:58
Simple two button control with a Teensy #2
/*
* TeensyTwoButtons.pde
*
* You must select Keyboard from the "Tools > USB Type" menu
*
* Download and install the Bounce library: http://www.pjrc.com/teensy/td_libs_Bounce.html
*
*/
#include <Bounce.h>
@raster
raster / TeensyTwoButtons.ino
Last active October 5, 2015 05:58
Simple two button control with a Teensy #3
/*
* Button.pde
*
* Created in collaboration with Basti Böhm
*
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
@raster
raster / G-code for RepRap
Created June 27, 2012 18:46
G-code for RepRap
; Start G-code
G28 ; home all axes
; End G-code
G1 X12.0 F4000 ; home (almost) x
G1 Y170 F4000 ; move the print to the front.
M104 S0 ; make sure the extruder is turned off.
M140 S0 ; make sure the bed is turned off.
M84 ; shut down motors.
@raster
raster / DrawCircles
Created August 8, 2012 18:14
Processing sketch that draws circles
/*
* DrawCircles
*
*/
import processing.opengl.*;
void setup() {
size(screen.width, screen.height, OPENGL);
frameRate(120);
@raster
raster / Configuration.h
Created September 5, 2012 13:57
Marlin config
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
@raster
raster / Configuration_adv.h
Created September 5, 2012 13:58
Marlin config adv
#ifndef CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H
//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================
// Select one of these only to define how the bed temp is read.
//
//#define BED_LIMIT_SWITCHING
@raster
raster / wp_move.sql
Created March 13, 2013 13:51
WordPress URL Changer
/* update all post permalinks */
update wp_posts
set guid = REPLACE(guid, 'http://oldsite.com', 'http://newsite.com')
where guid LIKE '%http://oldsite.com%';
/* update all post content */
update wp_posts
SET post_content = REPLACE(post_content, 'http://oldsite.com', 'http://newsite.com')
where post_content LIKE '%http://oldsite.com%';
@raster
raster / userChrome.css
Created August 9, 2013 16:48
Hide Bookmark Icons
/* Hide Bookmark Folder Icon */
.bookmark-item[type="menu"] > .toolbarbutton-icon {
display: none !important;
}
/* Remove Bookmark Item Icons */
#personal-bookmarks toolbarbutton:not([type=menu]) image {
display: none !important;
-moz-margin-end: 0px !important;
}
/*
* TurntableControl.ino
* Libraries required:
* - Pololu DRV8835 Dual Motor Driver Carrier - https://github.com/raster/drv8835-motor-driver
* - ServoTimer2 Library - http://forum.arduino.cc/index.php?action=dlattach;topic=157400.0;attach=39747
*
* pete@2xlnetworks.com
*
*/