Tuxedo Flower Handkerchief

photo 1

Piece of fabric for the handkerchief.

photo 3 photo 4 photo 2

Pressure sensor (made with 2 pieces of conductive fabric sewn together, with a cotton piece with two holes in between).

photo 5

Sewn pressure sensor onto handkerchief fabric.

photo 2_2 photo 3_2

Sewn wire onto conductive fabric of pressure sensor.

photo 1_3

Other side of previous wires connected to card extracted from keyboard (using tape). Card sewn to handkerchief.

Screen Shot 2014-09-23 at 12.05.38 AM

I used a text application to test the connection of the wires (the other side of the wires connected to the pressure sensor) before positioning them  on the handkerchief and sewing them together. I checked that they function as keys, by moving them around and checking what appeared on the screen) in order to be able to understand where the connection is successful and can be useful. I decided to connect them in a way that they would function as keys: 0, 1, 2 and 8.

photo 3_3

Sow usb cable to handkerchief in order for it to be connected to the computer.

Screen Shot 2014-09-23 at 12.15.51 AM Screen Shot 2014-09-23 at 12.16.01 AM

I used Processing to create a sketch. The following is the code of that sketch:

Particle myParticle;
ArrayList<Particle> particles;

void setup (){

size(500,500);

particles = new ArrayList();

Particle p = new Particle();
particles.add( new Particle() );

}

void draw(){

background(192,148,206);

for (int i = 0; i < particles.size(); i++){
Particle p=particles.get(i);
p.update();
p.display();

}
}

void keyPressed(){
if (key == ‘n’);
particles.add(new Particle() );
println( particles.size() );
}

class Particle{

//variables
float x;
float y;
float velX;
float velY;

Particle(){
x = random(width);
y = random(height);
velX = random (-5,5);
velY = random(-5,5);

}

void display(){
ellipse(x,y,10,10);
fill (40,110,129);

}

void update(){
x += velX;
y += velY;
velX -= velX*.1;
velY -= velY*.1;

}
}

When pressing one of the keys (0, 1, 2 or 8) on the keyboard, moving ellipses appear. I connected the cable to the computer and used the pressure sensor to see the result: ellipses will appear in Processing. Depending on the code, many variations of this can be made to experiment.

photo 1_2

From: Greece Born: 1995 Parsons Paris AMT Student

Leave a reply