Skip to content

Instantly share code, notes, and snippets.

Avatar

Pete Prodoehl raster

View GitHub Profile
View LEDPinButton
#include <Bounce.h>
Bounce buttonD6 = Bounce(6, 80); // LED Pin - tie to +5v instead of GND
Bounce buttonD7 = Bounce(7, 80); // Normal Pin - tie to GND
void setup() {
pinMode(PIN_D6, INPUT); // LED Pin - use INPUT not INPUT_PULLUP
pinMode(PIN_D7, INPUT_PULLUP);
}
View TurntableControl.ino
/*
* 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
*
*/
@raster
raster / userChrome.css
Created Aug 9, 2013
Hide Bookmark Icons
View userChrome.css
/* 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;
}
@raster
raster / wp_move.sql
Created Mar 13, 2013
WordPress URL Changer
View wp_move.sql
/* 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%';
View Configuration_adv.h
#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
View Configuration.h
#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 / DrawCircles
Created Aug 8, 2012
Processing sketch that draws circles
View DrawCircles
/*
* DrawCircles
*
*/
import processing.opengl.*;
void setup() {
size(screen.width, screen.height, OPENGL);
frameRate(120);
View 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 / TeensyTwoButtons.ino
Last active Oct 5, 2015
Simple two button control with a Teensy #3
View TeensyTwoButtons.ino
/*
* Button.pde
*
* Created in collaboration with Basti Böhm
*
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
@raster
raster / TeensyTwoButtons2.ino
Last active Oct 4, 2015
Simple two button control with a Teensy #2
View TeensyTwoButtons2.ino
/*
* 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>
You can’t perform that action at this time.