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
// Libraries | |
//same as the other code expept instead of | |
//using buttons it uses arrow keys (wasd for player 1 and rightleftupdown for layer two) on the coputer keyboard | |
//import processing.serial.*; | |
//import cc.arduino.*; | |
//Calling Arduino Ports | |
//Arduino 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
Code provided by Tinkernut | |
http://www.tinkernut.com/2014/03/arduino-motion-detecting-squirt-gun/ | |
We didnt change anything in this code | |
const int pirPower = 13; | |
const int pirIn = 12; | |
int motorPin1 = 3; | |
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
This code is from the example section on Prosessing.org | |
It is authored by: Daniel Shiffman | |
I just changed the background colour from balck to white and made the window a little larger. | |
ArrayList<ParticleSystem> systems; | |
void setup() { | |
size(900, 660); | |
systems = new ArrayList<ParticleSystem>(); | |
} |
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
void setup (){ | |
size(600, 600);//size of canvas | |
background(120, 0, 11);//bachground colour HSB | |
} | |
void draw() {//opens draw loop which runs on loop | |
noStroke(); |
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
void setup() | |
got this from one of the examples, likes the thumbnail. | |
I added more points | |
{ | |
size(600, 600); //size of canvas | |
background(192, 64, 10);//background colour= orange |
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
//Camille Kauffman | |
//excercise 5-5 from Getting started with Arduino | |
const int SENSOR = 0; // select the input pin for the // sensor resistor | |
int val = 0; // variable to store the value coming // from the sensor | |
void setup() { | |
Serial.begin(9600); // open the serial port to send // data back to the computer at | |
} | |
void loop() { | |
// 9600 bits per second |
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
//Camille Kauffman | |
//excercise 5-4 from Getting Started with Arduino | |
const int LED = 9; // the pin for the LED | |
int val = 0; // variable used to store the value // coming from the sensor | |
void setup() { | |
pinMode(LED, OUTPUT); // LED is as an OUTPUT // Note: Analogue pins are | |
} |
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
//Camille Kauffman | |
//excercise 5-2 from Getting started with Arduino | |
const int LED = 9; // the pin for the LED | |
const int BUTTON = 7; // input pin of the pushbutton | |
int val = 0; // stores the state of the input pin int old_val = 0; // stores the previous value of "val" | |
int state = 0; // 0 = LED off while 1 = LED on | |
int brightness = 128; // Stores the brightness value unsigned long startTime = 0; // when did we begin pressing? |
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
// BLINKING LED on/off | |
//Camille Kauffman | |
//excercise 4-5 from Getting Started with Arduino | |
const int LED = 12; //the pin for the LED | |
const int BUTTON = 7;//the input pin whrtr the pushbutton is connected | |
int val = 0;//val will be used to store the state of the input pin |
NewerOlder