Skip to content

Instantly share code, notes, and snippets.

View lizkhoo's full-sized avatar

Liz Khoo lizkhoo

View GitHub Profile
@lizkhoo
lizkhoo / PComp_Final
Created December 5, 2012 02:57
PComp Final: Loop homeowner stories, 2 triggers
import ddf.minim.*;
import processing.serial.*;
AudioPlayer[] sounds = new AudioPlayer[7];
Minim minim;
boolean firstContact = false;
boolean switch1Ready = false;
boolean switch2Ready = false;
Serial myPort;
@lizkhoo
lizkhoo / Feather
Created November 28, 2012 19:42
Feather Wall
class Feather {
PVector loc;
PVector velo;
PVector accel;
float lifespan;
PImage img;
float t, a;
Feather(PVector l, PImage img_) {
@lizkhoo
lizkhoo / windowShade_preFinal
Created November 9, 2012 01:19
PComp Midterm: Window Shade Pre-final
/*Intro to PComp Mid-term Fall 2012
Liz Khoo, Natalie Tschechaniuk, Katie Adee
-----Responsive Moire Window Shade-----
Parts:
- 18"x18" frame with dowels
- 6-position rotary switch
- Parallax PIR motion sensor
@lizkhoo
lizkhoo / CentralPark_Weather
Created October 30, 2012 17:01
CentralPark_Weather
PFont font;
PImage centralPark;
int counter = 0;
CPWeather wg;
Clouds[] littleClouds;
int count;
void setup() {
@lizkhoo
lizkhoo / windowShade_playTest
Created October 28, 2012 22:04
PComp Midterm: Window Shade Play Test
//ARDUINO CODE
//adapted from ITP's Intro to Physical Computing class Fall 2012
const int switchPin1 = 2;
const int switchPin2 = 4;
int potPin = A0;
int switch1Value = 0;
int switch2Value = 0;
int potValue;
@lizkhoo
lizkhoo / skunk_hat_video
Created October 28, 2012 20:04
Skunk hat with video
//ARDUINO CODE
//Most of the code courtesy of ITP's Intro to PComp Class
//for skunk hat with two FSRs
const int switchPin = 2;
int switchValue = 0;
int fsr1Value = 0;
int fsr2Value = 0;
void setup() {
@lizkhoo
lizkhoo / Diamonds02
Created October 24, 2012 03:17
Diamonds02 with video
//crystal raindrops with video
import processing.video.*;
Capture video;
int totalDiamonds = 10;
Diamond[] ourDiamonds = new Diamond[totalDiamonds];
void setup() {
@lizkhoo
lizkhoo / duckiehunt_02
Created October 12, 2012 17:23
Cleaned up version of Duckie Hunt game
Duck[] myDuck = new Duck[3];
Shotgun theGun;
Bullet theBullet;
PImage rubberduck;
color water = color(47, 108, 180);
PFont PTSans;
boolean gameOver = false;
void setup() {
@lizkhoo
lizkhoo / buttermybread
Created October 8, 2012 22:32
butter my bread
//butter machine for Arduino
#include <Servo.h> //add servo motor library
const int photoPin = A0; //input pin for photosensor
const int ledPin = 9;
int photoMin = 1023;
int photoMax = 0;
int photoValue = 1023;
@lizkhoo
lizkhoo / duckiehunt_01
Created October 4, 2012 19:55
duckiehunt_01
PFont PTSans;
color water = color(47, 108, 180);
PImage duck1, duck2, duck3;
float duck1x, duck2x, duck3x;
float duck1y, duck2y, duck3y;
float dspeed1, dspeed2, dspeed3;
boolean duckDraw1 = true, duckDraw2 = true, duckDraw3 = true; // decides whether to draw the duck
boolean duckHit1 = false, duckHit2 = false, duckHit3 = false; // tells me if the duck has been hit