Skip to content

Instantly share code, notes, and snippets.

View tatianajennings's full-sized avatar

tatianajennings

View GitHub Profile
/* Sweep
by BARRAGAN <http://barraganstudio.com>
This example code is in the public domain.
modified 8 Nov 2013
by Scott Fitzgerald
http://arduino.cc/en/Tutorial/Sweep*
/*Calibration
//created 29 Oct 2008
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
*/
// the setup routine runs once when you press reset:
int threshold = 1; // threshold value is found experimentally
// var declarations
float showlength = 5; // show duration, in minutes
int screenx = 960; // screen width px.
int screeny = 600; // screen height px
int[] audienceinput; // linear array containing audience input data
int[] script; // an array containing scenes/acts/script data. Eventually it will be loaded up from a text file, for now it is random data
int inputthreshhold = 48; // how many entries does it take to trigger an "audience" event
int eventindex = 0; // which audience response triggered the event is stored here
boolean aud_eventflag = false; // this is the audience-generated event flag
boolean god_eventflag = false; // and this is the gods-generated event !00000