PCOMP/ICM Final Project – Dandy in the Underworld
For my combined Physical Computing and Intro to Computational Media final project, I teamed up with Lisa Maria Ewing and our non-ITP friend Ashley Pridmore-Abrego to create our “Poetic Dandelion” a.k.a. “Dandy in the Underworld.”
We were inspired by the visuals in nature, and how they could potentially evoke sound and words. We wanted to create something that made reading poetry a more dynamic experience, both through breath, touch, and sound. Thinking of flowers that call for interaction, the dandelion came to mind – its call for breeze or breath to help it ability to procreate and spread itself out into the world. We talked with our friend Ashley, a sculptor, about materials we could use to make an electronic/mechanical type dandelion. She was excited about this potential for collaboration, and we brought her into our project to help in designing the look of our wired flower. Ashley’s eye and knowledge of materials was invaluable, and we all spent hours together building, wiring, and programming our project into its humble life.
After looking discussing what we want our dandelion to do, and looking at sketches of what it was going to look like, Ashley brought in materials for Lisa Maria and I to play with. We decided on building the flower from rubber tubing (the stem), foam (the center), and the spores from conductive copper wire and the tips of pieces of white rubber. To create the switch, we used two metal tips instead of rubber. We ran the wires down the stem, through the rubber tubing, and placed the flower on top of three antique wooden boxes which hid our arduino and breadboard.
Lisa Maria picked out a tone that was going to play when the first line of poetry is triggered. She worked with the minim library through processing. We then chose a text about nature and the changing seasons to be the visual output for our dandelion, the poem “Manos,” by our friend Claudia Narváez-Meza. We used Processing and the Arduino to bring the words to life on the screen, and we created a small animation that made the poem appear line by line triggered by someone blowing on the dandelions switch, then the line flies away like dandelion spores.
Check it out, yo! It works!
Special Thanks to Boris, Mindy, Aiwen, Jenine, Michael Zick Doherty, Ashley, Raul, Claudia, Jeremiah, Matt Parker, Corey, Tom Igoe, Dan O’Sullivan, and Daniel Shiffman for tutorial sessions, advice, help, materials, and guidance.
Manos
(para Virgo)
by Claudia Narváez-Meza
Verano
thumbs link and fold
my unquiet chest
I wheeze with new prayers
Otoño
sting of cooked herbs
heels of her palms
knead torso into breath
Invierno
balm petal and root
wax open the labyrinth
my tired lung
Primavera
I am falling
into the possibility
of seasons.
Arduino Source Code:
int button = 2;
int sensorValue = LOW;
int analog1 = 0;
int analog2 = 1;
void setup() {
pinMode(button, INPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(analog1);
Serial.print(sensorValue, DEC);
Serial.print(“,”);
sensorValue = analogRead(analog2);
Serial.print(sensorValue, DEC);
Serial.print(“,”);
sensorValue = digitalRead(button); //is the button pressed?
Serial.println(sensorValue, DEC);
}
Processing Source Code:
/*
Took from parts from Tom Igoe’s Serial String Reader, and Shiffman’s working with text chapter examples.
*/
import ddf.minim.*;
import processing.serial.*; // import the Processing serial library
Serial myPort; // The serial port
//String message = ” “;
String poemLine = ” “;
int i = 0;
PFont f;
Minim minim;
AudioSample song;
float bgcolor = 0; // Background color
float fgcolor; // Fill color
float xpos, ypos; // Starting position of the ball
int switchPin;
int preSwitchPin;
boolean flying = false;
int counter = 0;
String[]fileStrings;
Letter[] letters;
void setup() {
size(640,480);
fileStrings=loadStrings(“manos”);
f = createFont(“Palatino-Italic”, 25, true);
textFont(f);
// 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 Arduino module, so I open Serial.list()[0].
// Change the 0 to the appropriate number of the serial port
// that your microcontroller is attached to.
myPort = new Serial(this, Serial.list()[0], 9600);
poemLine = fileStrings[0];
// read bytes into a buffer until you get a linefeed (ASCII 10):
myPort.bufferUntil(‘\n’);
switchPin = 0;
preSwitchPin = 0;
background(bgcolor);
// always start Minim before you do anything with it
minim = new Minim(this);
// load BD.mp3 from the data folder with a 1024 sample buffer
//kick = Minim.loadSample(“BM201.mp3″);
// load BD.mp3 from the data folder, with a 512 sample buffer
song = minim.loadSample(“BM201.mp3″, 2048);
letters = new Letter[poemLine.length()];
int x = 16;
for (int i = 0; i < poemLine.length(); i++){ letters[i] = new Letter(x,height/2,poemLine.charAt(i)); x += textWidth(poemLine.charAt(i)); } } void draw() { background(0); //fill(255); //textFont(f); //float x = 10; counter = counter + 1; if (counter > 65) {
flying = true;
}
for (int i =0; i < letters.length; i++){
letters[i].display();
}
if (flying) {
flyOffScreen();
//song.trigger();
}
}
// serialEvent method is run automatically by the Processing applet
// whenever the buffer reaches the byte value set in the bufferUntil()
// method in the setup():
void serialEvent(Serial myPort) {
// read the serial buffer:
String myString = myPort.readStringUntil(‘\n’);
// if you got any bytes other than the linefeed:
if (myString != null) {
myString = trim(myString);
// split the string at the commas
// and convert the sections into integers:
int sensors[] = int(split(myString, ‘,’));
// print out the values you got:
for (int sensorNum = 0; sensorNum < sensors.length; sensorNum++) { print(“Sensor ” + sensorNum + “: ” + sensors[sensorNum] + “\t”); } // add a linefeed after all the sensor values are printed: println(); if (sensors.length > 1) {
xpos = map(sensors[0], 300,400,0,width);
ypos = map(sensors[1], 300,400,0,height);
fgcolor = sensors[2] * 255;
switchPin = int(sensors[2]); //making switchPin equal the current value of sensor 2
if(preSwitchPin == 0 && switchPin == 1){ //sensing change from 0 to 1
i=i+1;
//if(i < fileStrings.length)
//{
nextLine();
flying = false;
counter = 0;
song.trigger();
//}
//else
//{
//i = 0;
//background(0);
//}
}
preSwitchPin = switchPin; //set previous to the current value
}
}
}
void nextLine(){
// if(key== ‘f’){
// for all letters fly equals true
//}
//if(key== ‘ c’){
i=i+1;
poemLine=fileStrings[i];
letters = new Letter[poemLine.length()];
// make sure that fly gets reset to false, but it should automatically
int x = 16;
for (int i = 0; i < poemLine.length(); i++){
letters[i] = new Letter(x,100,poemLine.charAt(i));
x += textWidth(poemLine.charAt(i));
}
//}
}
void mousePressed() {
nextLine();
flying = false;
counter = 0;
song.trigger(); //here as well
//code look at every letter to see if offscreen is true keep running until its true
//when all is true, reset
}
void flyOffScreen() {
for (int i =0; i < letters.length; i++){
if(letters[i].x < 700 && letters[i].y > -50) {
letters[i].shake();
}
else {
letters[i].isOffScreen = true;
}
}
}
class Letter {
char letter;
float homex, homey;
float x, y, xL, yL;
boolean isOffScreen;
// float e = 50;
// boolean fly = false;
Letter(float x_, float y_, char letter_){
homex = x = x_;
homey = y = y_;
letter = letter_;
isOffScreen = false;
// xL=random(-200,0);
//yL=random(-300,0);
}
void display(){
fill(255);
textAlign(LEFT);
text(letter,x,y);
}
void shake(){
x += random(2,5);
y += random(-5,2);
}
void home(){
x = homex;
y = homey;
}
//void leave(){
//x = x + (xL – x)/e;
//y = y + (yL – y)/e;
//}
}












