Skip to content

Instantly share code, notes, and snippets.

Avatar

Pete Prodoehl raster

View GitHub Profile
View copy-ai-files.sh
#!/bin/sh
/usr/bin/find /Users/pete/Projects/ -name '*.ai' -exec cp -p \{\} /Users/pete/EXAMPLES/ \;
# copy just the .ai files
View GBC1280.py
#!/usr/local/bin/python3
#
# Pete Prodoehl <pete@2xlnetworks.com>
#
# Resizes Game Boy Camera photos to 1280x1152
#
from PIL import Image
import glob
import getopt
View ServoSweeps
/*
* ServoSweeps.ino
*
* Testing the BDG Digital I/O Arduino Shield
*
*/
#include <Servo.h>
@raster
raster / deleteold.sh
Created Jan 1, 2020
Shell script to delete old files and empty directories
View deleteold.sh
#!/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
@raster
raster / led.py
Last active Jan 8, 2019
Simple Python Script for Raspberry Pi
View led.py
#!/usr/bin/python3
# external module imports
import RPi.GPIO
import time
# button and LED assignment
button = 26
led = 19
@raster
raster / config.txt
Created Jan 1, 2019
Cohension3D Mini Smoothie config file for Full Spectrum Laser 4th Gen [20180527]
View config.txt
# 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
View Volt_Meter_Mount.scad
/*
* Volt Meter Mount
*
*
*/
mount();
module mount() {
@raster
raster / RandomColor.ino
Created Dec 10, 2016
Get comma separated values returned from a function
View RandomColor.ino
// RandomColor.ino
void setup() {
Serial.begin(9600);
randomSeed(analogRead(A0));
}
void loop() {
char* rgb = returnColors();
int r, g, b;
View ArcOMatic
/*
* ArcOMatic
*
* pete@rasterweb.net
* http://rasterweb.net/raster/
*
*/
#include <Servo.h>
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);
}
You can’t perform that action at this time.