Recitation 10: Media Controller by Serene Fan

In this recitation, I have explored how to use controller to manipulate images by combining processing and Arduino. Here is the video.

Here is the code.

import processing.serial.*;
PImage img1, img2;
PShader blur;
import processing.serial.*;

Serial myPort;
int valueFromArduino;

void setup() {
size(1200, 750);
img1 = loadImage(“recitation10.jpg”);
img2 = loadImage(“recitation10.jpg”);
blur = loadShader(“blur.glsl”);

printArray(Serial.list());
myPort = new Serial(this, Serial.list()[7], 9600);

}

void draw() {
image(img1, 0, 0);
image(img2, width/2, 0);
background(0);
while ( myPort.available() > 0) {
valueFromArduino = myPort.read();
}
println(valueFromArduino);
if (valueFromArduino>100) {
img1.filter(INVERT);
delay(1000);
} else {
img2.filter(INVERT);
delay(1000);
}

image(img1, 0, 0);
image(img2, width/2, 0);
}

At first, I did not add the last two lines of the code and every time I ran it the screen went black. Then I figured out that it was because the image will not restore to what they were like. After I added those two lines, if I spin the potentiometer, the image would then started to blink because of the loop. I like this effect but the rate of blinking seemed to be too fast, so I added “delay” to the code.

I found “Computer Vision for Artists and Designers: Pedagogic Tools and Techniques for Novice Programmers” inspiring. Like what is mentioned, the computer vision is gradually getting more accessible to folk programmers, allowing more explorations of interactive media arts using computer vision. People are less restricted by the domination of the keyboard and the mouse when interacting with computers.

I feel that even though what this article is talking about is way more technological than what we have done in our recitation, there is still resonation. For instance, we are also trying to use different physical controllers other than the keyboard and the mouse. Approaching more ways of depicting interaction, are adding more possibilities to their relation with technology. “Techniques exist which can create real-time reports about people’s identities, locations, gestural movements, facial expression, gait characteristics, gaze directions and other characteristics.” Techniques are more and more likely to be an amplification of human expression instead of just a neutral tool.

This is the image I used.

Leave a Reply