Thursday, December 17, 2009

TEAM KAAS - FINAL PROTOTYPE 9

INSPIRATION:
The inspiration for our project came as a video about socially awkward small public spaces, like an elevator. Here is the link to the video that we found both amusing and very truthful, as elevators are usually great examples of places where people avoid interactions:
http://www.youtube.com/watch?v=xTOwE3hnEWk&feature=related
IDEA:
Our final prototype represents a tile, that can be assembled into a larger installation or used by itself. Each tile is subdivided into smaller squares (in our case), or any other shapes. A microphone is built in into each subdivided piece and a simple LED circuit. When the microphone closest to the noise object detects the noise, the LED, associated with this microphone begins to react. The overall effect is an illusion, that an individual tile is associated with a particular person being at the moment in the elevator.

Labels: , , ,


Final Prototype Posting No. 3

Computer to Computer (Two Environments)

Final Prototype Posting No. 2

From Computer to Computer throug Pachube.com (Same Setting)

Final Prototype Posting No. 1

Data to Fan

Wednesday, December 16, 2009

Final Prototype_Shoe

Description:
Final Prototype is a pair of shoes, one is the input and local output, and the other "sister shoe" is the remote output.

Input:
Piezo tab

Output:
LED's and Sound

Setup:








































Code:

int analogPin = 3;
int ledPin = 2;
int ledPin2 = 3;
int ledPin3 = 4;
int ledPin4 = 5;
int ledPin5 = 6;
int ledPin6 = 7;
int ledPin7 = 8;
int ledPin8 = 9;
int speaker = 10;
int val = 0;
int tempo = 300;

void c () { // Presets the note "c" to be used later
digitalWrite(speaker, HIGH);
delayMicroseconds(3830);
digitalWrite(speaker, LOW);
delayMicroseconds(1915);
}
void d () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1700);
digitalWrite(speaker, LOW);
delayMicroseconds(3400);
}
void e () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1519);
digitalWrite(speaker, LOW);
delayMicroseconds(3038);
}
void f () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1432);
digitalWrite(speaker, LOW);
delayMicroseconds(2864);
}
void g () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1275);
digitalWrite(speaker, LOW);
delayMicroseconds(2550);
}
void a () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1136);
digitalWrite(speaker, LOW);
delayMicroseconds(2272);
}
void b () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1014);
digitalWrite(speaker, LOW);
delayMicroseconds(2028);
}
void C () {
digitalWrite(speaker, HIGH);
delayMicroseconds(956);
digitalWrite(speaker, LOW);
delayMicroseconds(1912);
}
const int numReadings = 10;

int readings[numReadings];
int index = 0;
int total = 0;
int average = 0;

void setup()
{
Serial.begin(9600);

for
(int thisReading = 0;
thisReading < total =" total" total =" total" index =" index">= numReadings)
index = 0;
average = total / numReadings;

if (average > 300)
{digitalWrite(ledPin,HIGH);
c();}
else
{digitalWrite(ledPin,LOW);}

if (average > 300)
{digitalWrite(ledPin2,HIGH);
d();}
else
{digitalWrite(ledPin2,LOW);}

if (average > 400)
{digitalWrite(ledPin3,HIGH);
e();}
else
{digitalWrite(ledPin3,LOW);}

if (average > 500)
{digitalWrite(ledPin4,HIGH);
f();}
else
{digitalWrite(ledPin4,LOW);}

if (average > 600)
{digitalWrite(ledPin5,HIGH);
g();}
else
{digitalWrite(ledPin5,LOW);}

if (average > 700)
{digitalWrite(ledPin6,HIGH);
a();}
else
{digitalWrite(ledPin6,LOW);}

if (average > 800)
{digitalWrite(ledPin7,HIGH);
b();}
else
{digitalWrite(ledPin7,LOW);}

if (average > 900)
{digitalWrite(ledPin8,HIGH);
C();}
else
{digitalWrite(ledPin8,LOW);}



Serial.println(average);

delay(200);
}

Labels: , ,


Prototype #12_on_Shoe

Description:
We took Prototype #11 and wired the LED's to our shoe prototype, and connected the Arduino to a 9V battery to make it portable.

Input:
Piezo Tab

Output:
8 LED's and Piezo knock element


Result:



Prototype with Sound output:



Code:

int analogPin = 3;
int ledPin = 2;
int ledPin2 = 3;
int ledPin3 = 4;
int ledPin4 = 5;
int ledPin5 = 6;
int ledPin6 = 7;
int ledPin7 = 8;
int ledPin8 = 9;
int speaker = 10;
int val = 0;
int tempo = 300;

void c () { // Presets the note "c" to be used later
digitalWrite(speaker, HIGH);
delayMicroseconds(3830);
digitalWrite(speaker, LOW);
delayMicroseconds(1915);
}
void d () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1700);
digitalWrite(speaker, LOW);
delayMicroseconds(3400);
}
void e () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1519);
digitalWrite(speaker, LOW);
delayMicroseconds(3038);
}
void f () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1432);
digitalWrite(speaker, LOW);
delayMicroseconds(2864);
}
void g () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1275);
digitalWrite(speaker, LOW);
delayMicroseconds(2550);
}
void a () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1136);
digitalWrite(speaker, LOW);
delayMicroseconds(2272);
}
void b () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1014);
digitalWrite(speaker, LOW);
delayMicroseconds(2028);
}
void C () {
digitalWrite(speaker, HIGH);
delayMicroseconds(956);
digitalWrite(speaker, LOW);
delayMicroseconds(1912);
}
const int numReadings = 10;

int readings[numReadings];
int index = 0;
int total = 0;
int average = 0;

void setup()
{
Serial.begin(9600);

for
(int thisReading = 0;
thisReading < numReadings;
thisReading++)
readings[thisReading] =0;

pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
pinMode(ledPin5, OUTPUT);
pinMode(ledPin6, OUTPUT);
pinMode(ledPin7, OUTPUT);
pinMode(ledPin8, OUTPUT);
pinMode(speaker, OUTPUT);
}



void loop()
{
total = total - readings[index];
readings[index] = analogRead(analogPin);
total = total + readings[index];
index = index +1;

if
(index >= numReadings)
index = 0;
average = total / numReadings;

if (average > 300)
{digitalWrite(ledPin,HIGH);
c();}
else
{digitalWrite(ledPin,LOW);}

if (average > 300)
{digitalWrite(ledPin2,HIGH);
d();}
else
{digitalWrite(ledPin2,LOW);}

if (average > 400)
{digitalWrite(ledPin3,HIGH);
e();}
else
{digitalWrite(ledPin3,LOW);}

if (average > 500)
{digitalWrite(ledPin4,HIGH);
f();}
else
{digitalWrite(ledPin4,LOW);}

if (average > 600)
{digitalWrite(ledPin5,HIGH);
g();}
else
{digitalWrite(ledPin5,LOW);}

if (average > 700)
{digitalWrite(ledPin6,HIGH);
a();}
else
{digitalWrite(ledPin6,LOW);}

if (average > 800)
{digitalWrite(ledPin7,HIGH);
b();}
else
{digitalWrite(ledPin7,LOW);}

if (average > 900)
{digitalWrite(ledPin8,HIGH);
C();}
else
{digitalWrite(ledPin8,LOW);}



Serial.println(average);

delay(200);
}

Labels: , ,


Prototype #10 & 11

Description:
4 LED's light up sequentially in response to the act of bending the piezo tab .

INput:
Piezo Tab

OUTput:
4 LED's

Setup:
Prototype #10



Prototype #11


Code:

int analogPin = 3;
int ledPin = 2;
int ledPin2 = 3;
int ledPin3 = 4;
int ledPin4 = 5;
int ledPin5 = 6;
int ledPin6 = 7;
int ledPin7 = 8;
int ledPin8 = 9;
int speaker = 10;
int val = 0;
int tempo = 300;

void c () { // Presets the note "c" to be used later
digitalWrite(speaker, HIGH);
delayMicroseconds(3830);
digitalWrite(speaker, LOW);
delayMicroseconds(1915);
}
void d () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1700);
digitalWrite(speaker, LOW);
delayMicroseconds(3400);
}
void e () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1519);
digitalWrite(speaker, LOW);
delayMicroseconds(3038);
}
void f () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1432);
digitalWrite(speaker, LOW);
delayMicroseconds(2864);
}
void g () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1275);
digitalWrite(speaker, LOW);
delayMicroseconds(2550);
}
void a () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1136);
digitalWrite(speaker, LOW);
delayMicroseconds(2272);
}
void b () {
digitalWrite(speaker, HIGH);
delayMicroseconds(1014);
digitalWrite(speaker, LOW);
delayMicroseconds(2028);
}
void C () {
digitalWrite(speaker, HIGH);
delayMicroseconds(956);
digitalWrite(speaker, LOW);
delayMicroseconds(1912);
}
const int numReadings = 10;

int readings[numReadings];
int index = 0;
int total = 0;
int average = 0;

void setup()
{
Serial.begin(9600);

for
(int thisReading = 0;
thisReading < numReadings;
thisReading++)
readings[thisReading] =0;

pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
pinMode(ledPin4, OUTPUT);
pinMode(ledPin5, OUTPUT);
pinMode(ledPin6, OUTPUT);
pinMode(ledPin7, OUTPUT);
pinMode(ledPin8, OUTPUT);
pinMode(speaker, OUTPUT);
}



void loop()
{
total = total - readings[index];
readings[index] = analogRead(analogPin);
total = total + readings[index];
index = index +1;

if
(index >= numReadings)
index = 0;
average = total / numReadings;

if (average > 300)
{digitalWrite(ledPin,HIGH);
c();}
else
{digitalWrite(ledPin,LOW);}

if (average > 300)
{digitalWrite(ledPin2,HIGH);
d();}
else
{digitalWrite(ledPin2,LOW);}

if (average > 400)
{digitalWrite(ledPin3,HIGH);
e();}
else
{digitalWrite(ledPin3,LOW);}

if (average > 500)
{digitalWrite(ledPin4,HIGH);
f();}
else
{digitalWrite(ledPin4,LOW);}

if (average > 600)
{digitalWrite(ledPin5,HIGH);
g();}
else
{digitalWrite(ledPin5,LOW);}

if (average > 700)
{digitalWrite(ledPin6,HIGH);
a();}
else
{digitalWrite(ledPin6,LOW);}

if (average > 800)
{digitalWrite(ledPin7,HIGH);
b();}
else
{digitalWrite(ledPin7,LOW);}

if (average > 900)
{digitalWrite(ledPin8,HIGH);
C();}
else
{digitalWrite(ledPin8,LOW);}



Serial.println(average);

delay(200);
}

Labels: , ,


Prototype #9

Description:
As the Piezo tab is bent, the Piezo element buzzer produces a tone that increases with the amount of force applied to the tab.

Input:
Piezo tab

Output:
Piezo buzzer

Setup:

















Result:




Code:
int analogPin = 3; // potentiometer wiper (middle terminal) connected to analog pin 3 // outside leads to ground and +5V
int ledPin = 13; // LED connected to digital pin 9
int val = 0; // variable to store the value read
void setup()
{
Serial.begin(9600); // setup serial
pinMode(ledPin, OUTPUT); // sets the pin as output
}
void loop()
{
val = analogRead(analogPin)/4; // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin); // read the input pin
digitalWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}

Labels: ,


Prototype #8

Description:
By bending the piezo tab back and forth we are now able read variable output values in the serial monitor in Arduino interface.

Input:
Piezo Film

Output:
Serial read of values in Arduino

Setup:















Result:

Code:
int analogPin = 3; // potentiometer wiper (middle terminal) connected to analog pin 3 // outside leads to ground and +5V
int ledPin = 13; // LED connected to digital pin 9
int val = 0; // variable to store the value read
void setup()
{
Serial.begin(9600); // setup serial
pinMode(ledPin, OUTPUT); // sets the pin as output
}
void loop()
{
val = analogRead(analogPin)/4; // read the input pin
Serial.println(val); // debug value
val = analogRead(analogPin); // read the input pin
digitalWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}


Labels: , ,


Tuesday, December 15, 2009

Microphone Circuits - Prototype #1

http://www.arch.columbia.edu/work/courses/visual-studies/f09-living-architecture/man-kei-sham?page=1

1.

inline void digitalPullup(byte pin, boolean b) { pinMode(pin, INPUT); digitalWrite(pin, b?HIGH:LOW); }
#if defined(__AVR_ATmega1280__)
inline void analogPullup(byte pin, boolean b) { digitalPullup(pin+54,b); }
#else
inline void analogPullup(byte pin, boolean b) { digitalPullup(pin+14,b); }
#endif

void setup() {
Serial.begin(9600);
pinMode(clearred, OUTPUT);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);

analogPullup(0, true); // enable the 20kOhm pull-up on analog pin 0
}

void loop() {
// read the analog input into a variable:
int analogValue = analogRead(0);
// print the result:
Serial.println(analogValue);
// wait 10 milliseconds for the analog-to-digital converter
// to settle after the last reading:
delay(200); //slow enough to examine the values. Yell registers higher than 500 at about 1023.
}


2.

potential processing code (with amplifier:LM386, an op-amp):

/*
* Monitor for sound sensor
*/

int potPin = 2; // select the input pin for sound sensor
int ledPin = 13; // select the pin for the LED
int val = 0;
int amp = 0;

void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
}

void loop() {
val = analogRead(potPin);
amp = (val >= 512) ? val - 512 : 512 - val;
if (amp > 100) {
digitalWrite(ledPin, HIGH);
delay(20);
}
else {
digitalWrite(ledPin, LOW);
}
}

3.

//This is the code we ended up using. We got it to run and we got the light to come on, but we couldn't get it to respond to the microphone.

#define cleared 13

inline void digitalPullup(byte pin, boolean b) { pinMode(pin, INPUT);
digitalWrite(pin, b?HIGH:LOW); }

#if defined(__AVR_ATmega1280__)
inline void analogPullup(byte pin, boolean b) { digitalPullup(pin+54,b); }

#else
inline void analogPullup(byte pin, boolean b) { digitalPullup(pin+14,b); }

#endif

void setup() {
Serial.begin(9600);
pinMode(cleared, OUTPUT);
//pinMode(red, OUTPUT);
//pinMode(green, OUTPUT);

analogPullup(0, true); // enable the 20kOhm pull-up on analog pin 0
}

void loop() {
// read the analog input into a variable:
int analogValue = analogRead(0);
// print the result:
Serial.println(analogValue);
digitalWrite(cleared, HIGH);
pinMode(cleared, OUTPUT);
// wait 10 milliseconds for the analog-to-digital converter
// to settle after the last reading:
delay(200); //slow enough to examine the values. Yell registers higher than 500 at about 1023.
}


Labels: , , ,


Monday, December 14, 2009

codes




arduino:


piezo film as input sensor


piezo knock as output





questions:


1. how can we reverse the values
because right now the more you distort the film the closer to zero you get

2. we are getting a series of what we believe to be live values....we need to be able to store them
(I think it is best we do this in processing)








int analogPin = 3; // potentiometer wiper (middle terminal) connected to analog pin 3 // outside leads to ground and +5Vint ledPin = 9; // LED connected to digital pin 9
int val = 0; // variable to store the value read
void setup(){ Serial.begin(9600); // setup serial pinMode(ledPin, OUTPUT); // sets the pin as output}
void loop(){ val = analogRead(analogPin); // read the input pin Serial.println(val); // debug value
val = analogRead(analogPin); // read the input pin digitalWrite(ledPin, val / 4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255}






ok..... so on that note.....

how can we make this a bit louder

AND

in processing:

/** * Simple Read * * Read data from the serial port and change the color of a rectangle * when a switch connected to a Wiring or Arduino board is pressed and released. * This example works with the Wiring / Arduino program that follows below. */
import processing.serial.*;
Serial myPort; // Create object from Serial classint val; // Data received from the serial port
void setup() { size(600, 600); // I know that the first port in the serial list on my mac // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. String portName = Serial.list()[1]; myPort = new Serial(this, portName, 9600);}
void draw(){ if ( myPort.available() > 0) { // If data is available, val = myPort.read(); // read it and store it in val } background(255); // Set background to white if (val == 0) { // If the serial value is 0, fill(0); // set fill to black } else { // If the serial value is not 0, fill(204); // set fill to light gray } rect(50, 50, 100, 100);}

/*
// Wiring / Arduino Code// Code for sensing a switch status and writing the value to the serial port.
int switchPin = 4; // Switch connected to pin 4
void setup() { pinMode(switchPin, INPUT); // Set pin 0 as an input Serial.begin(9600); // Start serial communication at 9600 bps}
void loop() { if (digitalRead(switchPin) == HIGH) { // If switch is ON, Serial.print(1, BYTE); // send 1 to Processing } else { // If the switch is not ON, Serial.print(0, BYTE); // send 0 to Processing } delay(100); // Wait 100 milliseconds}
*/

this is reading the serial port of processing (with the same set up as seen above)

here the color of the serial port changes based on a value....i think this is a one time reading....

either that or...the values are reading too fast....

so

questions:

1. how can we slow down the values

2. how can we store the values.... i think using an array and/or witing a variable

3. how to interpret this data as audio output

- an echo...repeating the original input....(information repeated based on time variable)

or

- a tonal value....(a note produced at a specific frequency based on the value collected)

ie: the higher the value the higher the pitch (a direct relationship of the average values)


Prototype - Metronome II

/*
* YYZ
*
* Based on the basic Arduino example, Blink: http://www.arduino.cc/en/Tutorial/Blink
* Plays the opening rhythm to YYZ by Rush.
*/


const int LED_PIN = 13; // LED connected to digital pin 13
const int TEMPO = 100; // Beats per minute (the original song is
// played at 104 BPM but that's
// a little too fast to watch so it has
//been slowed down to 100 BPM)

// Delay in milliseconds = 1 minute 60 seconds 1000 milliseconds
// --------- * ---------- * -----------------
// (X) beats minute second

const int QUARTER_NOTE = (int)((60.0 * 1000.0) / (float)TEMPO);
const int EIGHTH_NOTE = QUARTER_NOTE / 2;
const int SIXTEENTH_NOTE = EIGHTH_NOTE / 2;


void setup() // Run once, when the sketch starts
{
pinMode(LED_PIN, OUTPUT); // Sets the digital pin as output
}

void loop() // Run over and over again
{
// Rush: YYZ (-.--|-.--|--..)
PlayNote(EIGHTH_NOTE);
PlayNote(SIXTEENTH_NOTE);
PlayNote(EIGHTH_NOTE);
PlayNote(EIGHTH_NOTE);
// ----
PlayNote(EIGHTH_NOTE);
PlayNote(SIXTEENTH_NOTE);
PlayNote(EIGHTH_NOTE);
PlayNote(EIGHTH_NOTE);
// ----
PlayNote(EIGHTH_NOTE);
PlayNote(EIGHTH_NOTE);
PlayNote(SIXTEENTH_NOTE);
PlayNote(SIXTEENTH_NOTE);
}

void PlayNote(int nDuration)
{
nDuration = (nDuration / 2);
digitalWrite(LED_PIN, HIGH); // Set the LED on
delay(nDuration); // Wait for half the (original) duration
digitalWrite(LED_PIN, LOW); // Set the LED off
delay(nDuration); // Wait for half the (original) duration
}

+Video Upload

Labels: , ,


Wednesday, December 2, 2009

Final Prototype

Our final proposal is a system that responds to human voice or sound installed in small spaces such as elevators. Here is what we've done:
1. We bought this microphone -
http://www.sparkfun.com/commerce/product_info.php?products_id=8669
2. We searched for similar projects online and here are the scripts we found and our comments on results:
1.
int pinMode(potPin, INPUT);
int potpin = 2
void setup()                    // run once, when the sketch starts
{
 Serial.begin(9600);      // opens serial port, sets data rate to 9600 bps
 pinMode(potPin, INPUT);
}
 
void loop()                     // run over and over again
{
  Serial.println(analogRead(ledPin));
} 
 
Result: the value does not change on the bottom of the screen.

2.
int potpin = 2
void setup()                     // run once, when the sketch starts
{
 Serial.begin(9600);   // opens serial port, sets data rate to 9600 bps
 digitalWrite(potPin+14,LOW); // make sure that pull up resistor is disabled -- this is usually not necessary
 pinMode(potPin+14, INPUT); // set input mode for ADC pin potPin -- this is usually not necessary
}
 
void loop()                       // run over and over again
{
  Serial.println(analogRead(potPin));
}
Result: no changes

3.
int ledPin = 13;
int potPin = 2;    // connected to speaker output pc
int val = 0;       // variable to store the value coming from the sensor
 
void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
}
 
void loop() {
  val = analogRead(potPin);    // read the value from the sensor or audio input
  digitalWrite(ledPin, HIGH);
  delay(val);
  digitalWrite(ledPin, LOW);
  delay(val);                  // stop the program for some time
}
Result: after modifying the script slightly we see the led respond to loud noise, but the led stays on and blinks even if no noise is made. Tried to modify the script further, no changes.

4.
int ledPin = 13;
int potPin = 2;    // connected to speaker output pc
int val = 0;       // variable to store the value coming from the sensor
int avg = 0;
void setup() {
  pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT
  pinMode(potPin, INPUT);
}
 
void loop() {
  val = analogRead(potPin);    // read the value from the sensor or audio input
  avg = (avg * 127L + val) / 128;  // *duck* i dont know what kind of average this is... :-)
  digitalWrite(ledPin, avg > 100 ? HIGH : LOW); // use lower border for more HIGH-time
  delay(10); // use lower delay, if it doesnt flicker enough
}
Result: no changes

3. Nothing we did affected the value at the bottom of the screen. At some point the led did react to the sound, so that means the microphone does work. Here is the image of the hook up we had, which we also changed to test and

according to the pin number in the script:


Labels: , , ,


Sunday, November 29, 2009

Research: Arduino, Audio,Display, LED

LED BAR AUDIO SPECTRUM ANALYZER
http://www.youritronics.com/led-bar-audio-spectrum-analyzer/

KNIGHT RIDER LIGHT BAR by John Tokash
http://blog.tokash.org/2008/02/16/knight-rider-light-bar/

THE HIGH DEFINITION ARDUINO LED COLOR PICKER
http://www.embedds.com/the-high-definition-arduino-led-color-picker/

HOW TO SET UP ARDUINO WITH MAX/MXP
http://www.soundplusdesign.com/?p=1305

LED AUDIO VISUALIZER by Anthony Mattox
http://www.anthonymattox.com/led-audio-visualizer



Anka

Labels: , ,


Thursday, November 19, 2009

Use of a relay, second power source

http://laf07c.blogspot.com/2007/10/elegonprototype02postings.html


http://laf07c.blogspot.com/2007/10/how-to-use-relay-by-elegon-team.html


http://laf07c.blogspot.com/2007/10/elegonprototype03postings.html

Wednesday, November 18, 2009

Prototype #8

We have decided earlier that we have been looking toward applying our prototype in a public bathroom or elevator. Both environments are known to have awkward social interactions and behaviors. A way to affect the normal behavior and experience of the human in these environments, conversation and voice vibration is encouraged in order to affect the environment and to direct people away from awkwardness. The intensity or hue of the lighting of the area will be affected by the encouragement of conversation and interaction.

So we started of with this prototype and hope to continue on :
















GOAL: Applying vibration to Piezo Vibration Sensor affect LED intensity.

PROCESS: Connected Piezo Vibration Sensor and LED. Tapping on Sensor or surface the arduino is placed on.

RESULT: Vibration of the sensor by tapping resulted in blinking of the LED.

CODE:
https://sites.google.com/a/divinechildhighschool.org/electronics/Home/Arduino-Lessons/analog-read-and-a-piezo

Labels:


Tuesday, November 17, 2009

Questions [ Jorge | Alfredo]

1] We’re having problems with the 2nd iteration of the Code. Is there a way that we can have it revised?

2] How can we really add more than one input and output source on each individual Arduino?

3] How can we get a percentage instead of a 230-something value that we receive from the LED light sensor for comparing it with another input source?

4] If we are able to read gas (Methane, CO2). Can we represent the data as an output using pressurized air bottles? (the ones that are used for cleaning keyboards)


Monday, November 16, 2009

Questions for help session

a problem: pachube is live feed exchange....how can we store values from arduino... to be used at a later time (ie: download info per day)How do we vary the code so that it add the previous value?

1. Sim to tutorial 2: getting a value from an LED to pachube: How do we get a value from the piezo onto pachube.... can we just replace piezo with LED light sensor? How do we edit the code do be specific about what the value is measuring?

2. Need code to transfer data from pachube back to arduino
- how can we convert pachube output value into variations of audio outputs...
- Do we use the same piezo buzzer as the output or do we need to have two piezi per shoe?
- example: changing speed of beats or frequency
Does pachube repeat a series of values....or an average?

3.

Thursday, November 12, 2009

Reference: Gas sensors from Figaro with Arduino

http://www.arch.columbia.edu/work/courses/visual-studies/f09-living-architecture/anya-gribanova

http://www.arch.columbia.edu/work/courses/visual-studies/f09-living-architecture/anya-gribanova?page=1

http://www.instructables.com/id/How-To-Smell-Pollutants/

Thursday, November 5, 2009

Interactive Map - Midterm - Team K.A.A.S.



























This is current map came to be the background for our project.

We have build a successful prototype that was able to receive data trough Pachube and display it with a set of two circuits with red LED's, form which each one displayed data form a different place in the world. First, used a feed form Cambridge University and the second one received the same data category form Syracuse, New York. We have chosen these two places because we have decided that they have provided the best data.

Unluckily we have not realized that those two places have quite similar weather conditions during this time in the year, therefore intensity of light was very similar and it was hard to determine the difference.


Another prototype, which we have worked on as well was the RGB LED circuit that was to change from Blue to REd and back with a certain timing. We have also experimented with other colors but they were not displayed with a good enough clarity and therefore we have decided that blue-red-blue change will not cause the confusion other colors would.

Ideally, two prototypes would be combined and current real-time data form a feed would be compared to the past information (average temperature for that same day x years ago).

Labels: , , ,


Wednesday, November 4, 2009

Environmental Simulation through Pachube data

Using Arduino Board and recollecting temperature, light, humidity, wind, and precipitation data from one specific place and transmitting it through the Internet using Pachube. That numeric data mimics the environment from a remote location turning on a fan, a light, a water mister, a heater.







Light Sensor Code (Sending Data to Pachube)





Possibilities

MAIN


Our main purpose for this project will result on an installation replicating two different conditions on two interior spaces in Brooklyn. The expectations of expandability of the project will be the expression of five different Pachube feeds, preferably from international locations.


IMG1

GREENHOUSE ASSIMILATION (LAB)


The Greenhouse is a glass building that protects plants from the cold environment. But, what if the plants that we grow have the precise environmental con

ditions from the place that they are endemic? The result: more effective agriculture.


IMG2

[ANTI] Jet-Lag ENVIRONMENTS


An example of this could be if Kendra has the most important reunion about a 1 Billion-Dollar project in Dubai in two weeks. She needs to be ready and alert for this significant meeting. The solution: Replicate Dubai environment at home in Brooklyn two days before the

flight. The result: Kendra will be well rested and ready to be successful.

INSTALLATION - ATTRACTION

On a largest scale, what if we would like to replicate the exact Antarctica, or Istanbul environment on a controlled location for people to enjoy and travel just by opening and closing doors? What if we could replicate Beijing’s Pollution or Sahara’s Snow Storms on a minute-by-minute updating?

ANIMAL/PLANT TRANSPORTATION

How to transport a Penguin from the South Pole to New York without the animal being affected? In which way the endangered Flying Witch Plant from the Atacama Desert in Chile can be transported without been affected to another location with similar environmental conditions? The solution: creating a transportation crate that assimilates the conditions in which the living organism resides.

Prototyping

Two (2) Environments :: Two (2) Data

Pachube enables us to get two or more inputs on the same feed. We are tracking down lighting conditions and translating them into numbers. With that we are trying to dim a LED on the two different Arduino Boards on two different rooms. We are recollecting Data and the next step is to represent that data on the opposite Arduino Board. After we get the Sensor/Dimmable Light to work, we will be able to control temperature and ventilation very easily.

Labels:


Prototype #7



GOAL: Connect several breadboards to the Arduino board and have it react to the Pachube feeds.

PROCESS: Connected second breadboard, created two simple circuits and modified the script.

RESULT: Both LEDs turn on and change intensity.

CODE:

import processing.serial.*;
import cc.arduino.*;

import eeml.*;

Arduino arduino;
int myValue;

DataIn dIn;

void setup()
{
size(245,245);
println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[1], 115200);
dIn = new DataIn(this,"http://www.pachube.com/api/feeds/1816.xml", "cb5ac556b416f518567ee5dfec0d9af7cad7a444b52e5e662e796205ca63f7f7", 5000);
dIn = new DataIn(this,"http://www.pachube.com/api/feeds/2251.xml", "cb5ac556b416f518567ee5dfec0d9af7cad7a444b52e5e662e796205ca63f7f7", 5000);
}
void draw()
{
println(myValue);
arduino.analogWrite(9,myValue);
arduino.analogWrite(10,myValue);
}
void onReceiveEEML(DataIn d){
float remoteValue = d.getValue(1);
float remoteValue2 = d.getValue(2);
myValue = int(remoteValue) / 10;
myValue = int(remoteValue) / 10;
}


Labels: , , ,


Prototype #6


GOAL: Create a circuit that would change intensity of the LED light depending on the specific conditions.

PROCESS: Created a simple circuit with 100 OM resistor and a one color LED.

RESULT: Although it is hard to see, the LED changes the intensity of the light. When running the script, the output numbers vary by 1 to 3 numbers, which is insignificant and therefore does not produce clearly noticeable change in light intensity.

CODE:

import processing.serial.*;
import cc.arduino.*;

import eeml.*;

Arduino arduino;
int myValue;

DataIn dIn;

void setup()
{
size(255,255);
println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[1], 115200);
dIn = new DataIn(this,"http://www.pachube.com/api/feeds/536.xml", "cb5ac556b416f518567ee5dfec0d9af7cad7a444b52e5e662e796205ca63f7f7", 5000);
}

void draw()
{
println(myValue);
arduino.analogWrite(10,myValue);
}

void onReceiveEEML(DataIn d){
float remoteValue = d.getValue(0);
myValue = int(remoteValue) / 1;
}

SOURCE:

Labels: , , ,


diagrams

Diagram of existing prototype @ mid term







Diagram of the proposed 'next step'

Labels:


Prototype #7: MidTerm

Description:
We have taken our portable Prototype #6 and adapted it to become 'wearable'.
We switch our input back to the piezo element due to its robustness and ease of adaptability for the shoe.

Input:
Tapping of the shoe

Output:
LED turns ON and OFF

Setup:





















Result:


Code:
/* Knock Sensor
* ----------------
*
* Program using a Piezo element as if it was a knock sensor.
*
* We have to basically listen to an analog pin and detect
* if the signal goes over a certain threshold. If the Threshold
* is crossed, and toggles the LED on pin 13.
*
* Modified from one by (cleft) 2005 D. Cuartielles for K3
*/

int ledPin = 13;
int knockSensor = 2;
byte val = 0;
int statePin = LOW;
int THRESHOLD = 1; // if it's too sensitive then change this value

void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
val = analogRead(knockSensor);
if (val >= THRESHOLD) { // check the piezo
statePin = !statePin; // sets the pin to the opposite state
digitalWrite(ledPin, statePin); // turn on or off the LED
}
}


http://electronics.divinechildhighschool.org/Home/Arduino-Lessons/analog-read-and-a-piezo

Labels: ,


Prototype #6: Portable Piezo

Description:
Using a 9V battery we have transformed our prototype into a portable device!!!

With this version we are testing a different kind of piezo tab, and not achieving the same results as the previous prototype. The LED is definitely responding, but does not have a clear ON and OFF output. The code is the same as Prototype #5 to start, and we adjust the THRESHOLD int, but does not seem to help.

Input:
Piezo film, different type than Prototype #5

Output:
LED response, not as clear as Prototype #5 output

Setup:





















Result:



Code:
/* Knock Sensor
* ----------------
*
* Program using a Piezo element as if it was a knock sensor.
*
* We have to basically listen to an analog pin and detect
* if the signal goes over a certain threshold. If the Threshold
* is crossed, and toggles the LED on pin 13.
*
* Modified from one by (cleft) 2005 D. Cuartielles for K3
*/

int ledPin = 13;
int knockSensor = 2;
byte val = 0;
int statePin = LOW;
int THRESHOLD = 100; // if it's too sensitive then change this value

void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
val = analogRead(knockSensor);
if (val >= THRESHOLD) { // check the piezo
statePin = !statePin; // sets the pin to the opposite state
digitalWrite(ledPin, statePin); // turn on or off the LED
}
}

http://electronics.divinechildhighschool.org/Home/Arduino-Lessons/analog-read-and-a-piezo

Labels: ,


mid term precedents

PORTABLE
http://nikerunning.nike.com/nikeos/p/nikeplus/en_US/humanrace/?id=race_day




COLLECTING ENERGY
http://sap.mit.edu/resources/portfolio/crowd_farm/




http://ecoble.com/2008/12/02/7-offbeat-off-the-grid-gadgets-inventions-and-innovations/

http://www.gizmag.com/go/7584/

Labels:


Prototype #5: Piezo film + LED

Description:
We had a mini-breakthrough and got the piezo tab to trigger a response in an LED.
One 'flick' of the tab turns the LED on, and another 'flick' turns it off, and so on.

Input:
Piezo Film Sensor

Output:
LED turning ON and OFF

Setup:





















Result:



Code:
/* Knock Sensor
* ----------------
*
* Program using a Piezo element as if it was a knock sensor.
*
* We have to basically listen to an analog pin and detect
* if the signal goes over a certain threshold. If the Threshold
* is crossed, and toggles the LED on pin 13.
*
* Modified from one by (cleft) 2005 D. Cuartielles for K3
*/

int ledPin = 13;
int knockSensor = 2;
byte val = 0;
int statePin = LOW;
int THRESHOLD = 100; // if it's too sensitive then change this value

void setup()
{
pinMode(ledPin, OUTPUT);
}

void loop()
{
val = analogRead(knockSensor);
if (val >= THRESHOLD) { // check the piezo
statePin = !statePin; // sets the pin to the opposite state
digitalWrite(ledPin, statePin); // turn on or off the LED
}
}


http://electronics.divinechildhighschool.org/Home/Arduino-Lessons/analog-read-and-a-piezo

Monday, November 2, 2009

RGB LED Prototype #5



GOAL: Continuation from prototype #3

PROCESS: Using the same wiring as in Prototype #3 but a different code.

RESULT: As seen in the video above GOAL has been nearly achieved, because even though without full control on our side LED does perform a smooth and rhythmical transition between RED and BLUE component.

CODE:

//i/o pin declarations
int rpin = 9;
int gpin = 10;
int bpin = 11;

//function prototypes
void solid(int r, int g, int b, int t);
void fade(int r1, int g1, int b1, int r2, int g2, int b2, int t);

void setup()
{
//empty
}

void loop()
{
//colour sequence instructions

//Example sequence one: Rainbow fade over 15 seconds:
fade(255,0,0,0,255,0,5000); //fade from red to green over 5 seconds
fade(0,255,0,0,0,255,5000); //fade from green to blue over 5 seconds
fade(0,0,255,255,0,0,5000); //fade from blue to red over 5 seconds
}

//function holds RGB values for time t milliseconds
void solid(int r, int g, int b, int t)
{

//map values - arduino is sinking current, not sourcing it
r = map(r, 0, 255, 255, 0);
g = map(g, 0, 255, 255, 0);
b = map(b, 0, 255, 255, 0);

//output
analogWrite(rpin,r);
analogWrite(gpin,g);
analogWrite(bpin,b);

//hold at this colour set for t ms
delay(t);

}

//function fades between two RGB values over fade time period t
//maximum value of fade time = 30 seconds before gradient values
//get too small for floating point math to work? replace floats
//with doubles to remedy this?
void fade(int r1, int g1, int b1, int r2, int g2, int b2, int t)
{

float r_float1, g_float1, b_float1;
float r_float2, g_float2, b_float2;
float grad_r, grad_g, grad_b;
float output_r, output_g, output_b;

//declare integer RGB values as float values
r_float1 = (float) r1;
g_float1 = (float) g1;
b_float1 = (float) b1;
r_float2 = (float) r2;
g_float2 = (float) g2;
b_float2 = (float) b2;

//calculate rates of change of R, G, and B values
grad_r = (r_float2-r_float1)/t;
grad_g = (g_float2-g_float1)/t;
grad_b = (b_float2-b_float1)/t;

//loop round, incrementing time value "i"
for ( float i=0; i<=t; i++ ) { output_r = r_float1 + grad_r*i; output_g = g_float1 + grad_g*i; output_b = b_float1 + grad_b*i; //map values - arduino is sinking current, not sourcing it output_r = map (output_r,0,255,255,0); output_g = map (output_g,0,255,255,0); output_b = map (output_b,0,255,255,0); //output analogWrite(rpin, (int)output_r); analogWrite(gpin, (int)output_g); analogWrite(bpin, (int)output_b); //hold at this colour set for 1ms delay(1); } }

SOURCE:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207331496

Labels: , , ,


RGB LED Prototype #4















GOAL: Continuation from prototype #3

PROCESS: Using the same wiring as in Prototype #3 but a different code.

RESULT: As seen in the video above still RED LED light has been obtained. Feels like a step back from prototype #3, this needs further development.

CODE:

int potpin = 2;              // Switch connected to digital pin 2

int rpin = 9;
int gpin = 10;
int bpin = 11;
float h;
int h_int;
int r=0, g=0, b=0;

int val=0;

void h2rgb(float h, int &R, int &G, int &B);

void setup() // run once, when the sketch starts
{
Serial.begin(9600); // set up Serial library at 9600 bps
}


void loop() // run over and over again
{
val=analogRead(potpin); // Read the pin and display the value
//Serial.println(val);
h = ((float)val)/1024;
h_int = (int) 360*h;
h2rgb(h,r,g,b);
Serial.print("Potentiometer value: ");
Serial.print(val);
Serial.print(" = Hue of ");
Serial.print(h_int);
Serial.print("degrees. In RGB this is: ");
Serial.print(r);
Serial.print(" ");
Serial.print(g);
Serial.print(" ");
Serial.println(b);

analogWrite(rpin, r);
analogWrite(gpin, g);
analogWrite(bpin, b);
}

void h2rgb(float H, int& R, int& G, int& B) {

int var_i;
float S=1, V=1, var_1, var_2, var_3, var_h, var_r, var_g, var_b;

if ( S == 0 ) //HSV values = 0 ÷ 1
{
R = V * 255;
G = V * 255;
B = V * 255;
}
else
{
var_h = H * 6;
if ( var_h == 6 ) var_h = 0; //H must be < var_i =" int(" var_i =" floor(" var_1 =" V" var_2 =" V" var_3 =" V" var_i ="=" var_r =" V" var_g =" var_3" var_b =" var_1" var_i ="=" var_r =" var_2" var_g =" V" var_b =" var_1" var_i ="=" var_r =" var_1" var_g =" V" var_b =" var_3" var_i ="=" var_r =" var_1" var_g =" var_2" var_b =" V" var_i ="=" var_r =" var_3" var_g =" var_1" var_b =" V" var_r =" V" var_g =" var_1" var_b =" var_2" r =" (1-var_r)" results =" 0" g =" (1-var_g)" b =" (1-var_b)">

SOURCE:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207331496

Labels: , , ,


This page is powered by Blogger. Isn't yours?