Skip to content

Instantly share code, notes, and snippets.

View raster's full-sized avatar

Pete Prodoehl raster

View GitHub Profile
@raster
raster / led.py
Last active January 8, 2019 17:56
Simple Python Script for Raspberry Pi
#!/usr/bin/python3
# external module imports
import RPi.GPIO
import time
# button and LED assignment
button = 26
led = 19
@raster
raster / config.txt
Created January 1, 2019 18:28
Cohension3D Mini Smoothie config file for Full Spectrum Laser 4th Gen [20180527]
# NOTE Lines must not exceed 132 characters
## Robot module configurations : general handling of movement G-codes and slicing into moves
default_feed_rate 4000 # Default rate ( mm/minute ) for G1/G2/G3 moves
default_seek_rate 4000 # Default rate ( mm/minute ) for G0 moves
mm_per_arc_segment 0.0 # Fixed length for line segments that divide arcs 0 to disable
mm_max_arc_error 0.01 # The maximum error for line segments that divide arcs 0 to disable
# note it is invalid for both the above be 0
# if both are used, will use largest segment length based on radius
#mm_per_line_segment 5 # Lines can be cut into segments ( not usefull with cartesian
/*
* Volt Meter Mount
*
*
*/
mount();
module mount() {
@raster
raster / RandomColor.ino
Created December 10, 2016 18:30
Get comma separated values returned from a function
// RandomColor.ino
void setup() {
Serial.begin(9600);
randomSeed(analogRead(A0));
}
void loop() {
char* rgb = returnColors();
int r, g, b;
/*
* ArcOMatic
*
* pete@rasterweb.net
* http://rasterweb.net/raster/
*
*/
#include <Servo.h>
#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);
}
/*
* 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 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;
}
@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 / 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