This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Love-o-meter: under pressure | |
//Craig Pickard | |
//this is an indicator level with 6 stages, the first stage has four levels | |
//with green LEDs, the highest two levels use red LEDs to indicate danger | |
const int levelOne = 5; //green LED | |
const int levelTwo = 6; //green LED | |
const int levelThree = 7; //green LED | |
const int levelFour = 8; //green LED | |
const int levelFive = 9; //green LED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Craig Pickard | |
//ICM - Week 2: basic animation | |
//About this program: | |
/* | |
This program contains a button that switches between two modes, | |
there is a drawing mode, where a mousePressed event draws a | |
collection of circles (defined by random variables) around the mouse pointer. | |
clicking the button, and changing modes, spawns a collection of | |
randomly appearing variables. A mouseclick event enables the eraser, | |
which allows the user to erase the circles. The erasers brush size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//notes for later version: | |
//add shooting sounds & music | |
//add obstacles for the jet to dodge | |
//add explosions for hits | |
PImage img; // create image for jet | |
PImage imgTwo; //create image for clouds | |
Cloud[] clouds = new Cloud[5]; //an array of clouds | |
Bullet[] bullets = new Bullet[1]; //one bullet object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; // import the Processing serial library | |
Serial myPort; // The serial port | |
float bgcolor; // Background color | |
float fgcolor; // Fill color | |
float xDegree, yDegree; // Starting position of the ball | |
boolean firstContact = false; | |
int buttonState; | |
// boolean button = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int buttonPin = 2; | |
void setup(){ | |
Serial.begin(9600); | |
pinMode(buttonPin, INPUT); | |
establishContact(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ICM - Week 4 | |
//Craig Pickard, September 2014 | |
//mathematical equations taken from | |
//the pendulum class is for the most part adapted from Daniel Shiffmans 2005 example, | |
//but has been updating using PVectors. | |
//the program begins with the angle to the vertical, for each pendulum, | |
//equal to zero. Manually drag any of the pendulums to the desired starting angle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ICM - Week 4 | |
//Craig Pickard, September 2014 | |
//mathematical equations taken from | |
//the pendulum class is for the most part adapted from Daniel Shiffmans 2005 example, | |
//but has been updating using PVectors. | |
//the program begins with the angle to the vertical, for each pendulum, | |
//equal to zero. Manually drag any of the pendulums to the desired starting angle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.requests.*; | |
import processing.serial.*; //import serial library | |
Serial myPort; //declare a serial port | |
int buttonValue; | |
int previousButtonValue; | |
boolean receivingData = false; | |
int sensorvalue=0; | |
//create a boolean variable to establish whether or not the arduino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//P-comp midterm | |
//Instagram grid-button prototype | |
//5 October 2014 | |
//Craig Pickard and Minju Viviana Kim | |
boolean checkButtons = false; | |
//assign variables for each grid tile | |
const int button1 = 2; | |
const int button2 = 3; | |
const int button3 = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//code based on Ricardo Uvina's instrucables project, found here: http://www.instructables.com/id/Simple-IR-proximity-sensor-with-Arduino/?ALLSTEPS | |
//P-Comp mid-term | |
//Craig Pickard and Minju Vivan Kim | |
//IR swipe detector | |
//11 October 2014 | |
int IRpin = A0; // IR photodiode on analog pin A0 | |
int IRemitter = 2; // IR emitter LED on digital pin 2 | |
int thresholdLEDpin = 12; // red LED on digital pin 12. | |
int ambientIR; // variable to store the IR coming from the ambient |
OlderNewer