Skip to content

Instantly share code, notes, and snippets.

View slambert's full-sized avatar

Steve Lambert slambert

View GitHub Profile
@slambert
slambert / Function Example 20120221.pde
Created February 21, 2012 19:48
This is a processing sketch that draws sets of circles and moves other sets across the screen. It uses a couple funtions.
// this draws sets of circles in rows on the screen
// Steve Lambert February 14, 2012
// variables
int stage = 1;
float cDim = 15; // dimensions of the circle
float y = 0 - cDim; // y is the starting position of the row
float xSpacing = cDim; // spacing between the circles
float ySpacing = 10; // spacing below each row
@slambert
slambert / faceblur.pde
Created April 10, 2012 20:48
Face blur
// Get OpenCV here: http://ubaa.net/shared/processing/opencv/
import hypermedia.video.*;
import java.awt.Rectangle;
OpenCV opencv;
// contrast/brightness values
int contrast_value = 0;
@slambert
slambert / lambert-flasher-program.pde
Last active October 6, 2015 00:28
Custom Light Controller program for Arduino and relays
//relay pins
#define relayAPin 2
#define relayBPin 3
#define relayCPin 4
#define relayDPin 5
#define relayEPin 6
#define relayFPin 7
#define relayGPin 8
#define relayHPin 9
@slambert
slambert / Sonar 100 v041.ino
Last active February 26, 2019 04:53
3 sonar pinging, light controller - for 100% piece
/*
Sonar 100% Program
v.0.4.1
This version has:
* 3 sonar units
* LEDs to show when triggered
* variable trigger distance set with a pot
* An error LED to show if a sonar unit is out.
@slambert
slambert / add-art-rss20-sample.xml
Created May 20, 2013 17:02
a sample RSS feed to flesh out how it would work
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Art Channel Name</title>
<link>http://museum.art/add-art/</link>
<description>Brief description of the venue providing the images.</description> <!-- limit what's displayed in the Add-Art interface to a couple sentences. -->
<image>http://museum.art/add-art/icon.png</image> <!-- a small, standarized size logo image for the organization. To be displayed in the interface. -->
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate> <!-- show in interface as 12 June '13 -->
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate> <!-- needed? -->
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
@slambert
slambert / home.php
Created November 30, 2013 21:46
home page of my site. Uses multiple queries, but I think there is a better way.
<?php get_header() ?>
<!-- generated with home.php -->
<div id="home-banner">
<?php putRevSlider("tsleadin") ?>
</div><!-- #home-banner-->
<div id="home-container">
@slambert
slambert / category.php
Created December 1, 2013 14:47
Category.php page from my site
<?php get_header() ?>
<!-- created with category.php -->
<?php get_sidebar() ?>
<hr />
<div id="content">
<!--checking if this is a for sale page-->
<?php
@slambert
slambert / WordPress Thumbnail
Created February 28, 2015 20:20
WordPress Thumbnail Function
// Thumbnail Function - this creates a default thumbnail if one is specified
function get_thumb ($post_ID){
$thumbargs = array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post_ID
);
$thumb = get_posts($thumbargs);
if ($thumb) {
@slambert
slambert / 4 squares moving with different colors.pde
Created September 8, 2015 14:19
This is an example for class about the things they have questions about today.
/*
Steve Lambert
September 8, 2015
This is an example for class about the things
they have questions about today.
*/
@slambert
slambert / robot w red eyes that moves.pde
Created September 8, 2015 18:22
a robot with red eyes that moves
void setup() {
size(480, 120);
smooth();
background(240);
rectMode(CENTER);
// done with setup
}
void draw() {