Sunday, May 4, 2008
[final boards]
[prototype13_final]

above: prototype in site and details of movement.
below: the overall apparatus.
detail of movement.
movement in site.
tactile interaction.
Labels: [cm:sd], flexinol, mysql, pbasic, processing
Thursday, May 1, 2008
[prototype12_relays]
hooked up three relays, each to its own 9v and flexinol...
but there was very little movement. We tried tightening the flexinol, using lighter gauge piano wire, connecting to bigger scarier batteries, but without much success. Experimented with paper (instead of piano wire) and got a much greater range of movement.
PBASIC CODE:
' {$STAMP BS2}
' {$PBASIC 2.5}
check VAR Byte
proIn VAR Byte
Main:
DO
check = IN3
proIn = IN10
SERIN 16, 16780, [proIn]
IF proIn > 0 THEN
IF proIn <>
HIGH 9
LOW 2
HIGH 15
PAUSE 5000
LOW 9
HIGH 2
LOW 15
ENDIF
ENDIF
IF proIn > 13 THEN
IF proIn <>
LOW 9
HIGH 2
LOW 15
PAUSE 2000
HIGH 9
LOW 2
HIGH 15
PAUSE 2000
LOW 9
HIGH 2
LOW 15
PAUSE 2000
HIGH 9
LOW 2
HIGH 15
ENDIF
ENDIF
IF proIn > 20 THEN
IF proIn <>
HIGH 15
LOW 2
HIGH 9
PAUSE 1500
LOW 15
HIGH 2
LOW 9
PAUSE 1500
HIGH 15
LOW 2
HIGH 9
PAUSE 1500
LOW 15
HIGH 2
LOW 9
ENDIF
ENDIF
LOOP
END
Labels: [cm:sd], flexinol, pbasic, relay
Tuesday, April 15, 2008
[prototype11_air quality data to flexinol]
PBASIC CODE:
'{$STAMP BS2}
'{$PBASIC 2.5}
check VAR Byte
proIn VAR Byte
Main:
DO
check = IN3
proIn = IN10
SERIN 16, 16780, [proIn]
HIGH 2
PAUSE 2000
LOW 2
PAUSE 2000
IF proIn > 13 THEN
IF proIn <>
' DO WHILE proIn > 13
HIGH 2
PAUSE 9000
LOW 2
'LOOP
'END
ENDIF
ENDIF
LOOP
END
Linked the air quality data to the output, but the Flexinol shipment hasn't come in, so below is a movie of what we think the end product might look like.
Labels: [cm:sd], flexinol, pbasic
Wednesday, April 9, 2008
[prototype10_output experiments.3]
[prototype10_output experiments.2]
[prototype10_output experiments.1]
[prototype09_shock test]
Labels: [cm:sd]
Wednesday, April 2, 2008
[prototype08_remote data] + output speculations
downloading invisible and illegible air quality measurements from the internet and translating the data into light, the environment is rendered visible.
PBASIC CODE:
'{$STAMP BS2}
'{$PBASIC 2.5}
x VAR Byte
y VAR Byte
proIn VAR Byte
Main:
DO
SERIN 16, 16780, [proIn]
IF proIn>10 THEN
LOW 2
ENDIF
IF proIn<10>20 THEN
LOW 3
ENDIF
IF proIn<30>50 THEN
HIGH 4
ENDIF
IF proIn<50>70 THEN
HIGH 4
ENDIF
LOOP
END
[output1_shock plates]
with a small electrical charge passed through one's feet the daily air quality forecast can serve as a pointed reminder.
[output2_tickler]
tactile. informative. funny.
[output3_sound]
outside of the already cluttered visual experience, perhaps pitch (which can be quickly and accurately perceived) can occupy an underutilized sensory space.
[output4_pressurized air]
a gentle burst of air directed to the face very literally brings the quality of the environment to a personal and senstive level. information conveyed via the medium that it represents.
[output5_static electricity]
at once a sensory and visual experience, individuals can perceive information being passed through their own bodies as well as through the bodies of others.
PBASIC CODE:
'{$STAMP BS2}
'{$PBASIC 2.5}
x VAR Byte
y VAR Byte
proIn VAR Byte
Main:
DO
SERIN 16, 16780, [proIn]
IF proIn>10 THEN
LOW 2
ENDIF
IF proIn<10>20 THEN
LOW 3
ENDIF
IF proIn<30>50 THEN
HIGH 4
ENDIF
IF proIn<50>70 THEN
HIGH 4
ENDIF
LOOP
END
[output1_shock plates]
with a small electrical charge passed through one's feet the daily air quality forecast can serve as a pointed reminder.
[output2_tickler]
tactile. informative. funny.
[output3_sound]
outside of the already cluttered visual experience, perhaps pitch (which can be quickly and accurately perceived) can occupy an underutilized sensory space.
[output4_pressurized air]
a gentle burst of air directed to the face very literally brings the quality of the environment to a personal and senstive level. information conveyed via the medium that it represents.
[output5_static electricity]
at once a sensory and visual experience, individuals can perceive information being passed through their own bodies as well as through the bodies of others.
Friday, March 28, 2008
[prototype07_multiple outputs]
multiple lights increase the potential resolution of data visualization, a prediction of future complexity.
PBASIC CODE:
'{$STAMP BS2}
'{$PBASIC 2.5}
Main:
DO
HIGH 2
PAUSE 1000
LOW 2
PAUSE 1000
HIGH 3
PAUSE 1000
LOW 3
PAUSE 1000
HIGH 4
PAUSE 1000
LOW 4
PAUSE 1000
HIGH 5
PAUSE 1000
LOW 5
PAUSE 1000
LOOP
END
Tuesday, March 25, 2008
[prototype06_mysql to processing to pbasic to output]
Here, we have an LED responding to Air Quality Data being streamed over the internet and filtered through MYSQL. Processing is used to stream the data.
PROCESSING
import de.bezier.sql.*;
import de.bezier.mysql.*;
import processing.serial.*;
MySQL msql;
Serial myPort;
String table = "airTest";
String[] si = new String[636];
void setup()
{
size( 100, 100 );
println(Serial.list());
myPort = new Serial(this, "COM3", 2400);
//String user = "dbo238508103";
// String pass = "Ueb6pwb8";
// name of the database to use
//
//String database = "db238508103";
msql = new MySQL( "db192.perfora.NET", "db238508103", "dbo238508103", "Ueb6pwb8", this );
if ( msql.connect() )
{
// create a table with an id and a word
//
msql.execute( "CREATE TABLE IF NOT EXISTS " + table + " ("+
"id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"+
"word VARCHAR( 255 )"+
")"
);
msql.query( "SELECT * FROM " + table );
int scount = 0;
while (msql.next())
{
String s = msql.getString("word");
si[scount] = s;
int n = msql.getInt("id");
println(s + " " + n);
float f = float(s);
scount = scount + 1;
}
// need to find out how many rows there are in table?
//
msql.query( "SELECT COUNT(*) FROM " + table );
msql.next();
println( "number of rows: " + msql.getInt(1) );
}
else
{
// connection failed !
}
}
void draw()
{
int gg = 0;
int f;
while(gg < f ="int(si[gg]);">0){
delay(1000);
println("port");
println(myPort.available());
if (myPort.available() == 0) {
delay(1000);
int x = int(si[gg]);
println(x);
myPort.write(x);
println("value");
println(si[gg]);
gg = gg + 1;
// myPort.stop();
PBASIC
'{$STAMP BS2}
'{$PBASIC 2.5}
x VAR Byte
y VAR Byte
proIn VAR Byte
Main:
DO
SERIN 16, 16780, [proIn]
IF proIn>10 THEN
LOW 2
ENDIF
IF proIn<10>
HIGH 2
ENDIF
IF proIn>20 THEN
LOW 3
ENDIF
IF proIn<30>
HIGH 3
ENDIF
IF proIn<30>
LOW 4
ENDIF
IF proIn>50 THEN
HIGH 4
ENDIF
IF proIn<50>
LOW 4
ENDIF
IF proIn>70 THEN
HIGH 4
ENDIF
LOOP
END
}
myPort.clear();
delay(1000);
}
}
Labels: [cm:sd], mysql, pbasic, processing
Wednesday, March 12, 2008
[prototype05_mysql to processing]

PROCESSING
import de.bezier.mysql.*;
// created 2005-05-10 by fjenett
// updated 2005-11-16 by fjenett
MySQL msql;
void setup()
{
size( 100, 100 );
// this example assumes that you are running the
// mysql server locally (on "localhost").
//
// replace --username--, --password-- with your mysql-account.
//
//String user = "--username--";
//String pass = "--password--";
// name of the database to use
//
//String database = "--database--";
// name of the table that will be created
//
String table = "test";
// connect to database of server "localhost"
//
//msql = new MySQL( "localhost", database, user, pass, this );
msql = new MySQL( "SQL06.FREEMYSQL.NET", "ecovis", "fbitonti", "housebed202", this );
if ( msql.connect() )
{
// create a table with an id and a word
//
msql.execute( "CREATE TABLE IF NOT EXISTS " + table + " ("+
"id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"+
"word VARCHAR( 255 )"+
")"
);
// fill the table with some data
//
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"Lorem\")" );
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"ipsum\")" );
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"dolor\")" );
// now read it back out
//
msql.query( "SELECT * FROM " + table );
while (msql.next())
{
String s = msql.getString("word");
int n = msql.getInt("id");
println(s + " " + n);
}
// need to find out how many rows there are in table?
//
msql.query( "SELECT COUNT(*) FROM " + table );
msql.next();
println( "number of rows: " + msql.getInt(1) );
}
else
{
// connection failed !
}
}
void draw()
{
// i know this is not really a visual sketch ...
}
import de.bezier.mysql.*;
// created 2005-05-10 by fjenett
// updated 2005-11-16 by fjenett
MySQL msql;
void setup()
{
size( 100, 100 );
// this example assumes that you are running the
// mysql server locally (on "localhost").
//
// replace --username--, --password-- with your mysql-account.
//
//String user = "--username--";
//String pass = "--password--";
// name of the database to use
//
//String database = "--database--";
// name of the table that will be created
//
String table = "test";
// connect to database of server "localhost"
//
//msql = new MySQL( "localhost", database, user, pass, this );
msql = new MySQL( "SQL06.FREEMYSQL.NET", "ecovis", "fbitonti", "housebed202", this );
if ( msql.connect() )
{
// create a table with an id and a word
//
msql.execute( "CREATE TABLE IF NOT EXISTS " + table + " ("+
"id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,"+
"word VARCHAR( 255 )"+
")"
);
// fill the table with some data
//
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"Lorem\")" );
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"ipsum\")" );
msql.execute( "INSERT INTO " + table + " (word) VALUES (\"dolor\")" );
// now read it back out
//
msql.query( "SELECT * FROM " + table );
while (msql.next())
{
String s = msql.getString("word");
int n = msql.getInt("id");
println(s + " " + n);
}
// need to find out how many rows there are in table?
//
msql.query( "SELECT COUNT(*) FROM " + table );
msql.next();
println( "number of rows: " + msql.getInt(1) );
}
else
{
// connection failed !
}
}
void draw()
{
// i know this is not really a visual sketch ...
}
Labels: [cm:sd], mysql, processing
Tuesday, March 4, 2008
[prototype04_processing to microcontroller]
Getting two codes (PBASIC and Processing) to talk to each other. The first step in bringing remote data into the intelligence of a local device. This code communicates between the microcontroller and processing. When the mouse is pressed the LED turns on.
PROCESSING
// Example by Tom Igoe
import processing.serial.*;
int j=75;
Serial myPort; // The serial port
PFont myFont; // The display font
String inString; // Input string from serial port
int lf = 10; // ASCII linefeed
void setup() {
size(400,200);
// Make your own font. It's fun!
myFont = loadFont("ArialMT-48.vlw");
textFont(myFont, 48);
// List all the available serial ports:
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Keyspan adaptor, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, "COM3", 2400);
}
void draw() {
// Twiddle your thumbs
background(0);
if(mousePressed== true) {
myPort.write(j);
println("test");
}
text("Received: " + inString, 10, 50);
//else {
//myPort.write(0);
// }
// int j=75;
// myPort.write(j);
// text("Received: " + inString, 10, 80);
//noLoop();
serialEvent(myPort);
}
void serialEvent(Serial myPort) {
inString = myPort.readString();
}
PBASIC
' {$STAMP BS2}
' {$PBASIC 2.5}
x VAR Byte
y VAR Byte
proIn VAR Byte
Main:
DO
SERIN 16, 16780, [proIn]
IF proIn = 65 THEN
LOW 2
ENDIF
IF proIn > 0 THEN
HIGH 2
ENDIF
LOOP
END
Labels: [cm:sd], pbasic, processing
Tuesday, February 19, 2008
[prototype03_microcontroller to processing]
this week we made the micro controller communicate with the computer using Processing(rather than the computer sending the micro controller information).
using the photo resistor, a series of squares dance on the screen when exposed to light. when covered, the squares stop.
this test set up basic communication and understanding of code.
next week we plan to import data into processing and make the micro controller react (basically opposite of todays video).
if the micro controller can respond to lists of data then we can begin to import live air quality updates.
import processing.serial.*;
int bgcolor; // Background color
color fgcolor; // Fill color
Serial port; // The serial port
int[] serialInArray = new int[100]; // Where we'll put what we receive
int serialCount = 0; // A count of how many bytes we receive
float xpos, ypos; // Starting position of the ball
boolean firstContact = false; // Whether we've heard from the microcontroller
void setup() {
size(256, 256); // Stage size
noStroke(); // No border on the next thing drawn
// Set the starting position of the ball (middle of the stage)
xpos = width;
ypos = height;
// Print a list of the serial ports, for debugging purposes:
println(Serial.list());
port = new Serial(this, "COM3", 9600);
port.write(65); // Send a capital A to start the microcontroller sending
}
void draw() {
background(bgcolor);
noStroke();
rect(xpos, ypos, 20, 20);
rect(xpos/2, ypos/2, 20, 20);
rect(xpos/4, ypos/4, 20, 20);
stroke(255);
//line(xpos, ypos, xpos*6, ypos*6);
// Get any new serial data
while (port.available() > 0) {
serialEvent();
// Note that we heard from the microntroller:
firstContact = true;
}
// If there's no serial data, send again until we get some.
// (in case you tend to start Processing before you start your
// external device):
if (firstContact == true) {
fill(162,211,177);
delay(200);
port.write(65);
}
}
void serialEvent() {
processByte((char)port.read());
}
void processByte(char inByte) {
// Add the latest byte from the serial port to array:
serialInArray[serialCount] = inByte;
serialCount++;
// If we have 3 bytes:
if (serialCount >2 ) {
xpos = (float)serialInArray[0];
ypos = (float)serialInArray[2];
fgcolor = (int)serialInArray[2];
// Send a capital A to request new sensor readings:
port.write(65);
// Reset serialCount:
serialCount = 0;
}
}
Labels: [cm:sd], processing
Tuesday, February 12, 2008
[research agenda]
Tuesday, February 5, 2008
[prototype02_local sensor]
measuring light levels, a photoresistor controls the movement of the flexinol wire. intelligence responsive to the local environment.

Labels: [cm:sd], flexinol, photoresister








