Skip to content

Instantly share code, notes, and snippets.

View raster's full-sized avatar

Pete Prodoehl raster

View GitHub Profile
#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);
}
/*
* ArcOMatic
*
* pete@rasterweb.net
* http://rasterweb.net/raster/
*
*/
#include <Servo.h>
@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;
/*
* Volt Meter Mount
*
*
*/
mount();
module mount() {
@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
@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 / deleteold.sh
Created January 1, 2020 16:35
Shell script to delete old files and empty directories
#!/bin/bash
#
# This will delete JPG files more than 7 days old
# and video files more than 21 days old
# it will also delete old empty directories
CPATH='/mnt/TL'
find $CPATH/images -name "*.jpg" -type f -mtime +7 -delete
/*
* ServoSweeps.ino
*
* Testing the BDG Digital I/O Arduino Shield
*
*/
#include <Servo.h>
#!/usr/local/bin/python3
#
# Pete Prodoehl <pete@2xlnetworks.com>
#
# Resizes Game Boy Camera photos to 1280x1152
#
from PIL import Image
import glob
import getopt
#!/bin/sh
/usr/bin/find /Users/pete/Projects/ -name '*.ai' -exec cp -p \{\} /Users/pete/EXAMPLES/ \;
# copy just the .ai files