V&A Project prototype testing

After the work of whole Christmas Holiday, with the help of my tutor Nicolas, I added tech in the prototype of V&A Project with my partner Ted. The main idea is draw pattern with your foot and use 4 pressure mats to control acceleration of 4 directions, which are ‘up’, ‘down’, ‘right’ and ‘left’. The principle of the pressure mat is same to the button, when you step on the pressure mat, the same effect as you press the button, that is loop the circuit on, otherwise, broken circuit and make it off. At first, there a point of ASCII running randomly, but when it has a acceleration with any direction of these four, it will run towards the direction of acceleration. Finally, participator will get a pattern with ASCII made by them self.

 

IMG_5099.JPG  IMG_5103.JPG  IMG_5136.JPG

IMG_5184.JPGIMG_5170.JPG

 

Advertisements
V&A Project prototype testing

V&A processing code

import processing.serial.*;
Serial myPort; // Create object from Serial class
String val; // Data received from the serial port
float ballX;
float ballY;
float speedX;
float speedY;
float noiseCoord;

void setup(){
size( 800, 800 );
background(0,0,0);
ballX = 200;
ballY = 200 ;
speedX=5;
speedY=5;
// I know that the first port in the serial list on my mac
// is Serial.list()[0].
// On Windows machines, this generally opens COM1.
// Open whatever port is the one you’re using.
String portName = Serial.list()[0]; //change the 0 to a 1 or 2 etc. to match your port
myPort = new Serial(this, portName, 9600);
}

void draw(){

if ( myPort.available() > 0)
{ // If data is available,
val = myPort.readStringUntil(‘\n’); // read it and store it in val
}
println(val); //print it out in the console
noStroke();
fill(ballX,ballY,80);
ballX = ballX + speedX;
ballY =ballY +speedY;
//ellipse( ballX , ballY, 10 , 10 );
text(int(random(0,9)), ballX,ballY );
//text (random(‘E’,’*’), ballX, ballY);
if( ballY >=800 ){
speedY=random(-4,-10);

}if(ballX>=800){
speedX=random(-2, -8);

}if(ballY<=0){
speedY=random(3,6);

}if(ballX<=0){
speedX=random(5,8);
}
}
void keyPressed(){
//if (key == CODED){
if (keyCode == UP){
speedX= speedX+random(10,20); speedY= speedY+random(10,20);
}
if (keyCode == DOWN){
speedX= speedX+random(-10,-20);
}
if (keyCode == LEFT){
speedY= speedY+random(10,20);
}
if (keyCode == RIGHT){
speedY= speedY+random(-10,-20);
}

}

V&A processing code