//
// This example shows one way of using an LED as a light sensor.
// You will need to wire up your components as such:
//
// + digital2
// |
// <
// > 100 ohm resistor
// <
// |
// |
// -----
// / \ LED, maybe a 5mm, clear plastic is good
// -----
// |
// |
// + digital3
//
// What we are going to do is apply a positive voltage at digital2 and
// a low voltage at digital3. This is backwards for the LED, current will
// not fl ow and light will not come out, but we will charge up the
// capacitance of the LED junction and the Arduino pin.
//
// Then we are going to disconnect the output drivers from digital2 and
// count how long it takes the stored charge to bleed off through the
// the LED. The brighter the light, the faster it will bleed away to
// digital3.
//
// Then just to be perverse we will display the brightness back on the
// same LED by turning it on for a millisecond. This happens more often
// with brighter lighting, so the LED is dim in a dim room and brighter
// in a bright room. Quite nice.
//
// (Though a nice idea, this implementation is fl awed because the refresh
// rate gets too long in the dark and it fl ickers disturbingly.)
//
#define LED_N_SIDE 2
#define LED_P_SIDE 3
void setup()
{}
void loop()
{
unsigned int j;
// Apply reverse voltage, charge up the pin and led capacitance
pinMode(LED_N_SIDE,OUTPUT);
pinMode(LED_P_SIDE,OUTPUT);
digitalWrite(LED_N_SIDE,HIGH);
digitalWrite(LED_P_SIDE,LOW);
// Isolate the pin 2 end of the diode
pinMode(LED_N_SIDE,INPUT);
digitalWrite(LED_N_SIDE,LOW); // turn off internal pull-up resistor
// Count how long it takes the diode to bleed back down to a logic zero
for ( j = 0; j < 30000; j++) {
if ( digitalRead(LED_N_SIDE)==0) break;
}
// You could use ‘j’ for something useful, but here we are just using the
// delay of the counting. In the dark it counts higher and takes longer,
// increasing the portion of the loop where the LED is off compared to
// the 1000 microseconds where we turn it on.
// Turn the light on for 1000 microseconds
digitalWrite(LED_P_SIDE,HIGH);
digitalWrite(LED_N_SIDE,LOW);
pinMode(LED_P_SIDE,OUTPUT);
pinMode(LED_N_SIDE,OUTPUT);
delayMicroseconds(1000);
// we could turn it off , but we know that is about to happen at the loop() start
}
There exist three main elements in our research agenda. Each pertains to an important point that we hope to explore in our evolving and iterative process this semester.
1. Public Interaction
We will explore interactive architecture’s potential to impact the public realm. Large numbers of people will be able to experience, through active input, the output of our prototype.
2. Transfer of Information
We will create a prototype that will respond to the environment as well as transmitted (text message) input.
3. Remote AND Local Output
We will explore the possibility simultaneous remote and local output. Remote output will come in the form of transmitted information (via text) and local output will come in the form of lighting, motion or sound.
All of these elements, when combined, will comprise our project for the semester. While we anticipate many alterations along the way, this agenda serves as our guide at the outset.
RESEARCH TOPIC:
Density:
The movement patterns and interactions of people in communal places flow and change over time for a complex variety of reasons. It can be thought of as a conglomeration of energy. Whether it be humans or simple one celled organisms, density always produces a greater amount of potential energy. That potential energy can be dynamically dictated in a way that either produces a greater amount of energy (i.e. dance floors, Las Vegas) or a lower amount of energy (i.e. library).
Our question is twofold: how much is related to the surrounding architectural space itself, and might we, as architects, have an even greater ability to affect the dynamic interactions of people through taking a more interactive role ourselves? With this question in mind, we are interested in sensing the density of people in a given area and affecting gathering, movement, or interactions through resulting visual or audio cues. Through our investigation this semester, we will be exploring the possibilities of transmitting this information locally (in a visual or audio manner) as well as remotely (in a digital/information manner.)
Viability:
The concept of combining both local and remote output in a single prototype will present quite a challenge for the semester. Research into SMS technology as well as a specific form of local output will be necessary to produce a successful result. It is possible that, while we will undoubtedly have a goal of the type and quality of information we would like to transmit, and in what ways, we will have to start small and gradually work our way there. There is much room for exploration, and not until we begin will we have a better sense of what lies in store for us.
We will begin by exploring Flexinol wire as a way of possibly communicating density. We will combine this exploration with specific case studies and experiments. One initial experiment will be to explore how a partition dictates density patterns in a crowded space.
9V Battery Hooked Up to Arduino Hooked Up to Flexinol
The video shows the arduino hooked up to a 9v battery through the VIN pin on the arduino board and ground. Current is going through the flexinol since the LED lights up but the flexinol still isn't moving.
This project aims to be an index of invisible networks of communication. By making the invisible visible we are raising awareness of the communication networks that surround us. Area codes of texts will be used to create a visual map of the density of the users within a building or a social setting which could further represent and describe the behavior if not moods of the people within possibly affecting others who may happen to interact with it.
Gold and Silver Magnetic Sand give us options to use color
import processing.serial.*;
import cc.arduino.*;
import eeml.*;
Arduino myArduino;
DataOut dOut;
DataIn dIn;
int ledNeg = 2;
int ledPos = 3;
int ledGreen = 6;
int ledRed = 7;
float myValue;
int myValueIn;
float lastUpdate;
int updateInterval = 15000;
This is a screenshot of where we put the Arduino and EEML Libraries on our computers. Basically its C:\Program Files\processing-1.0.7\libraries
Here we've highlighted the baud rate that we changed from the original code. Note that we are using Processing 1.0.7.
Video for Tutorial 1
//
// This example shows one way of using an LED as a light sensor.
// You will need to wire up your components as such:
//
// + digital2
// |
// <
// > 100 ohm resistor
// <
// |
// |
// -----
// / \ LED, maybe a 5mm, clear plastic is good
// -----
// |
// |
// + digital3
//
// What we are going to do is apply a positive voltage at digital2 and
// a low voltage at digital3. This is backwards for the LED, current will
// not fl ow and light will not come out, but we will charge up the
// capacitance of the LED junction and the Arduino pin.
//
// Then we are going to disconnect the output drivers from digital2 and
// count how long it takes the stored charge to bleed off through the
// the LED. The brighter the light, the faster it will bleed away to
// digital3.
//
// Then just to be perverse we will display the brightness back on the
// same LED by turning it on for a millisecond. This happens more often
// with brighter lighting, so the LED is dim in a dim room and brighter
// in a bright room. Quite nice.
//
// (Though a nice idea, this implementation is fl awed because the refresh
// rate gets too long in the dark and it fl ickers disturbingly.)
//
#define LED_N_SIDE 2
#define LED_P_SIDE 3
void setup()
{}
void loop()
{
unsigned int j;
// Apply reverse voltage, charge up the pin and led capacitance
pinMode(LED_N_SIDE,OUTPUT);
pinMode(LED_P_SIDE,OUTPUT);
digitalWrite(LED_N_SIDE,HIGH);
digitalWrite(LED_P_SIDE,LOW);
// Isolate the pin 2 end of the diode
pinMode(LED_N_SIDE,INPUT);
digitalWrite(LED_N_SIDE,LOW); // turn off internal pull-up resistor
// Count how long it takes the diode to bleed back down to a logic zero
for ( j = 0; j < 30000; j++) {
if ( digitalRead(LED_N_SIDE)==0) break;
}
// You could use ‘j’ for something useful, but here we are just using the
// delay of the counting. In the dark it counts higher and takes longer,
// increasing the portion of the loop where the LED is off compared to
// the 1000 microseconds where we turn it on.
// Turn the light on for 1000 microseconds
digitalWrite(LED_P_SIDE,HIGH);
digitalWrite(LED_N_SIDE,LOW);
pinMode(LED_P_SIDE,OUTPUT);
pinMode(LED_N_SIDE,OUTPUT);
delayMicroseconds(1000);
// we could turn it off , but we know that is about to happen at the loop() start
}
Video for Tutorial 2
import processing.serial.*;
import cc.arduino.*;
import eeml.*;
Arduino myArduino;
DataOut dOut;
DataIn dIn;
int ledNeg = 2;
int ledPos = 3;
int ledGreen = 9;
float myValue;
int myValueIn;
float lastUpdate;
void setup()
{
println(Arduino.list());
myArduino = new Arduino(this, Arduino.list() [0], 57600);
dOut = new DataOut(this, "http://www.pachube.com/api/feeds/2744.xml", "2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746");
dOut.addData(0,"light value");
dIn = new DataIn(this, "http://www.pachube.com/api/feeds/2744.xml",
"2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746", 5000);
}
void draw()
{
myArduino.analogWrite(10, myValueIn);
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.digitalWrite(ledNeg, Arduino.HIGH);
myArduino.digitalWrite(ledPos, Arduino.LOW);
myArduino.pinMode(ledNeg, Arduino.INPUT);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
delay(30);
int j = 0;
int jFactor = 20;
int threshold = 0;
myValue = myArduino.analogRead(ledNeg);
for (j = 0; j < 30000; j++) {
if (j <= threshold) {
myArduino.analogWrite(ledGreen, 0);
}
else {
myArduino.analogWrite(ledGreen, j*jFactor);
}
delay(30);
if (myArduino.digitalRead(ledNeg) == 0) {
break;
}
}
print("j counter:");
print(" ");
print(j);
print("\t");
print("light value:");
print(" ");
print(myValue);
println();
myArduino.digitalWrite(ledPos, Arduino.HIGH);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
delay(500);
if ((millis() - lastUpdate) > 10000) {
println("ready to PUT: ");
dOut.update(0, myValue);
int response = dOut.updatePachube();
println(response);
println(myValue);
lastUpdate = millis();
}
}
void onReceiveEEML(DataIn d){
float remoteValue = d.getValue(0);
if (remoteValue <= 199) {
myValueIn = 55;
}
else { //if light value is higher than 199, make red led inside bright
myValueIn = 255;
}
}
Video for tutorial 3
import processing.serial.*;
import cc.arduino.*;
import eeml.*;
Arduino myArduino;
DataOut dOut;
DataIn dIn;
int ledNeg = 2;
int ledPos = 3;
int ledGreen = 6;
int ledRed = 9;
float myValue;
int myValueIn;
float lastUpdate;
int updateInterval = 15000;
void setup()
{
println(Arduino.list());
myArduino = new Arduino(this, Arduino.list() [0], 57600);
dOut = new DataOut(this, "http://www.pachube.com/api/feeds/2902.xml",
"2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746");
//dOut.addData(1,"light value");
dIn = new DataIn(this, "http://www.pachube.com/api/feeds/2902.xml",
"2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746", 7000);
myArduino.analogWrite(ledRed, 255);
}
void draw()
{
//dataIn (red led inside)
myArduino.analogWrite(ledRed, myValueIn);
//light sensor (red led outside)
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.digitalWrite(ledNeg, Arduino.HIGH);
myArduino.digitalWrite(ledPos, Arduino.LOW);
myArduino.pinMode(ledNeg, Arduino.INPUT);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
delay(30);
int j = 0;
int jFactor = 20;
int threshold = 0;
//data out value (set to ledNeg of red led outside)
myValue = myArduino.analogRead(ledNeg);
//local indicator (green led)
for ( j = 0; j < 30000; j++) {
if (j <= threshold) {
myArduino.analogWrite(ledGreen, 0);
}
else {
myArduino.analogWrite(ledGreen, j*jFactor);
}
delay(30);
if (myArduino.digitalRead(ledNeg) == 0) {
break;
}
}
//print to console current activity
print("j counter:");
print(" ");
print(j);
print("\t");
print("light value:");
print(" ");
print(myValue);
println();
//light sensor (red led outside)
myArduino.digitalWrite(ledPos, Arduino.HIGH);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
delay(500);
//data out (updates ledNeg to pachube.com)
if ((millis() - lastUpdate) > updateInterval) {
println("ready to update Pachube feed: ");
//dOut.update(0, myValue);
int response = dOut.updatePachube();
println(response);
println(myValue);
lastUpdate = millis();
}
}
void onReceiveEEML(DataIn d){
String remoteValue = d.getStringValue(0);
println("DataIn from Pachube: " + remoteValue);
if (remoteValue.equals("OFF")) {
myValueIn = 0;
}
if (remoteValue.equals("ON")) {
myValueIn = 255;
}
}
RESEARCH AGENDA:
There exist three main elements in our research agenda. Each pertains to an important point that we hope to explore in our evolving and iterative process this semester.
1. Public Interaction
We will explore interactive architecture’s potential to impact the public realm. Large numbers of people will be able to experience, through active input, the output of our prototype.
2. Transfer of Information
We will create a prototype that will respond to the environment as well as transmitted (text message) input.
3. Remote AND Local Output
We will explore the possibility simultaneous remote and local output. Remote output will come in the form of transmitted information (via text) and local output will come in the form of lighting, motion or sound.
All of these elements, when combined, will comprise our project for the semester. While we anticipate many alterations along the way, this agenda serves as our guide at the outset.
RESEARCH TOPIC:
Density:
The movement patterns and interactions of people in communal places flow and change over time for a complex variety of reasons. It can be thought of as a conglomeration of energy. Whether it be humans or simple one celled organisms, density always produces a greater amount of potential energy. That potential energy can be dynamically dictated in a way that either produces a greater amount of energy (i.e. dance floors, Las Vegas) or a lower amount of energy (i.e. library).
Our question is twofold: how much is related to the surrounding architectural space itself, and might we, as architects, have an even greater ability to affect the dynamic interactions of people through taking a more interactive role ourselves? With this question in mind, we are interested in sensing the density of people in a given area and affecting gathering, movement, or interactions through resulting visual or audio cues. Through our investigation this semester, we will be exploring the possibilities of transmitting this information locally (in a visual or audio manner) as well as remotely (in a digital/information manner.)
Viability:
The concept of combining both local and remote output in a single prototype will present quite a challenge for the semester. Research into SMS technology as well as a specific form of local output will be necessary to produce a successful result. It is possible that, while we will undoubtedly have a goal of the type and quality of information we would like to transmit, and in what ways, we will have to start small and gradually work our way there. There is much room for exploration, and not until we begin will we have a better sense of what lies in store for us.
We will begin by exploring Flexinol wire as a way of possibly communicating density. We will combine this exploration with specific case studies and experiments. One initial experiment will be to explore how a partition dictates density patterns in a crowded space.
Initial Flexinol Testing with a 9V Battery
9V Battery Hooked Up to Arduino Hooked Up to Flexinol
The video shows the arduino hooked up to a 9v battery through the VIN pin on the arduino board and ground. Current is going through the flexinol since the LED lights up but the flexinol still isn't moving.
Our First LEVER
Our Refined First LEVER
Flexinol and processing working together with text
This project aims to be an index of invisible networks of communication. By making the invisible visible we are raising awareness of the communication networks that surround us. Area codes of texts will be used to create a visual map of the density of the users within a building or a social setting which could further represent and describe the behavior if not moods of the people within possibly affecting others who may happen to interact with it.
Gold and Silver Magnetic Sand give us options to use color
import processing.serial.*;
import cc.arduino.*;
import eeml.*;
Arduino myArduino;
DataOut dOut;
DataIn dIn;
int ledNeg = 2;
int ledPos = 3;
int ledGreen = 6;
int ledRed = 7;
float myValue;
int myValueIn;
float lastUpdate;
int updateInterval = 15000;
void setup()
{
println(Arduino.list());
myArduino = new Arduino(this, Arduino.list() [0], 57600);
dOut = new DataOut(this, "http://www.pachube.com/api/feeds/2902.xml",
"2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746");
//dOut.addData(1,"light value");
dIn = new DataIn(this, "http://www.pachube.com/api/feeds/2902.xml",
"2a777b3ce06e86506edb7b2e5f9e874c08a19ecfbbbe22123c3def9501e8b746", 7000);
myArduino.analogWrite(ledRed, 255);
}
void draw()
{
//dataIn (red led inside)
myArduino.analogWrite(ledRed, myValueIn);
//light sensor (red led outside)
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.digitalWrite(ledNeg, Arduino.HIGH);
myArduino.digitalWrite(ledPos, Arduino.LOW);
myArduino.pinMode(ledNeg, Arduino.INPUT);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
delay(30);
int j = 0;
int jFactor = 20;
int threshold = 0;
//data out value (set to ledNeg of red led outside)
myValue = myArduino.analogRead(ledNeg);
//local indicator (green led)
for ( j = 0; j < 30000; j++) {
if (j <= threshold) {
myArduino.analogWrite(ledGreen, 0);
}
else {
myArduino.analogWrite(ledGreen, j*jFactor);
}
delay(30);
if (myArduino.digitalRead(ledNeg) == 0) {
break;
}
}
//print to console current activity
print("j counter:");
print(" ");
print(j);
print("\t");
print("light value:");
print(" ");
print(myValue);
println();
//light sensor (red led outside)
myArduino.digitalWrite(ledPos, Arduino.HIGH);
myArduino.digitalWrite(ledNeg, Arduino.LOW);
myArduino.pinMode(ledPos, Arduino.OUTPUT);
myArduino.pinMode(ledNeg, Arduino.OUTPUT);
delay(500);
//data out (updates ledNeg to pachube.com)
if ((millis() - lastUpdate) > updateInterval) {
println("ready to update Pachube feed: ");
//dOut.update(0, myValue);
int response = dOut.updatePachube();
println(response);
println(myValue);
lastUpdate = millis();
}
}
void onReceiveEEML(DataIn d){
String remoteValue = d.getStringValue(0);
println("DataIn from Pachube: " + remoteValue);
if (remoteValue.equals("OFF")) {
myValueIn = 0;
loop();
}
if (remoteValue.equals("ON")) {
myValueIn = 255;
delay(4000);
myValueIn = 0;
delay(11000);
noLoop();
link("http://livingarch.110mb.com/switch.php");
}
}