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
int soundSensor1 = 0; // piezo 1 connect to analog 0 | |
int soundSensor2 = 1; // piezo 2 connect to analog 1 | |
int threshold = 20; | |
int sensorReading1 = 0; //var to hold anaolg reading of piezo1 | |
int sensorReading2 = 0; //var to hold anaolg reading of piezo2 |
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
/* | |
Stepper Motor Control - Constant Revolutions | |
This program drives a unipolar or bipolar stepper motor. | |
The motor is attached to digital pins 8 - 11 of the Arduino. | |
Created 03/09/14 | |
Joselyn McDonald | |
Denah Emerson |
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
//Arduino Stuff | |
import processing.serial.*; | |
import cc.arduino.*; | |
Arduino arduino; | |
//ARDUINO ANALOG INPUTS | |
/****************Drummer One********************/ | |
int drum_one_sensor_1 = 5; | |
int drum_one_value_1 = 0; | |
int drum_one_sensor_2 = 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
//import the capSense Library | |
#include <CapacitiveSensor.h> | |
//these are the capsense inputs 2 is the common send the second number is the | |
//other digital input the sensor is attached to | |
CapacitiveSensor cs_2_3 = CapacitiveSensor(2,3); | |
CapacitiveSensor cs_2_4 = CapacitiveSensor(2,4); | |
CapacitiveSensor cs_2_5 = CapacitiveSensor(2,5); | |
void setup() { |
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 the Serial library so can read from arudino input via serial communication | |
import processing.serial.*; | |
// the number 10 is ASCII for linefeed (end of serial.println), | |
//later we will look for this to break up individual messages | |
int end = 10; | |
String serial; // declare a new string called 'serial' | |
Serial port; // The serial port, this is a new instance of the Serial class (an 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 the Serial library so can read from arudino input via serial communication | |
import processing.serial.*; | |
import spacebrew.*; | |
int end = 10; // the number 10 is ASCII for linefeed (end of serial.println), later we will look for this to break up individual messages | |
String serial; // declare a new string called 'serial' | |
Serial port; // The serial port, this is a new instance of the Serial class (an Object) | |
String server="sandbox.spacebrew.cc"; | |
String name="highlands"; |
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 tests your photoresistor and prints the value to the serial port to make sure your arduino is hooked up correctly | |
// to test with BlueFruit Ez-Link run code onto ardunio with it plugged into computer with USB port first & check you are getting input from your sensor with it plugged in | |
// Then unplug the arduino from the computer and change the input for the sketch by going to | |
// Tools > Serial Port > /dev/cu/adafruit....nameOfBlueTooth | |
// then open the serial monitor and you will be able to see the input from your sensor wirelessly!!! | |
int lightPin = 0; //define a pin for Photo resistor change this if your photosensor is in another analogue Pin | |
void setup() |
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
int lightPin = 0; //define a pin for Photo resistor | |
int light; // variable that holds input value from sensor. | |
//This will be mapped from 0 - 255 so it can be send as a Byte for OF to recieve | |
int bytesToSend[2]; //Array that hold the values you will be sending to OF | |
void setup() | |
{ |
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
int NUM_POINTS = 50; | |
PVector[] points = new PVector[NUM_POINTS]; | |
float[] random_nums = new float[NUM_POINTS]; | |
int mouse_count = 0; | |
float size; | |
void setup(){ | |
size(1000,700); | |
background(220,233,234); |
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.video.*; | |
Capture video; | |
int signal =0; | |
ArrayList frames = new ArrayList(); | |
int NUM_POINTS = 10; | |
PVector[] points = new PVector[NUM_POINTS]; | |
int[] random_nums = new int[NUM_POINTS]; | |
int mouse_count = 0; |
OlderNewer