Exhibition Next. document on technical component.

Document the needed element for an exhibition piece.

Exhibition Next. Final.

caption.

project appearance, digital and nature.

interactive element.

One week to grow the nature part of the project.

MVI_49031 

An animation with nature soundtrack.

Serial communication:

import processing.serial.*;
import processing.video.*;
Movie myMovie;
Serial myPort;
int bamboo=0;

 

void setup() {
//size(800, 600);

myMovie = new Movie(this, “bamboooo.mp4”);
myMovie.loop();
imageMode(CENTER);
fullScreen();

 

printArray(Serial.list());
String portName = Serial.list()[5];
myPort = new Serial(this, portName, 9600);
myPort.bufferUntil(‘\n’);
}

void draw() {
serialEvent();
if (bamboo==1) {
image(myMovie, width/2, height/2,width,height);
myMovie.play();
} else {
myMovie.pause();
}
}
void movieEvent(Movie m) {
m.read();
}
//image(img, 0, 0);

//void draw () {

// tint(255, 20);
// if (val =< 10) {
// movieEvent(Movie myMovie);
// }
// else if (val> 10) {

 

// }
//}

 

void serialEvent() {
// read the serial buffer:
while (myPort.available() >0) {
//String myString = myPort.readStringUntil(‘\n’);
// if you got any bytes other than the linefeed:
//myString = trim(myString); // to remove empty value
bamboo = int(myPort.read()); //myPort.read();
println(bamboo);
}
}

//void movieEvent(Movie m) {
// m.read();
//}

//}

 

Arduino:

int sensorPin = A0;
int sensorValue = 0;
int cmd=0;

void setup() {
Serial.begin(9600);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.print(sensorValue );
if(sensorValue>10){
cmd=1;
}
else{
cmd=0;
}
Serial.write(cmd);
delay(1000);
}

 

hardware: moisture sensor, Arduino, projector, laptop.

 

Leave a Reply