Recitation 9 Media Controller
During this recitation I used a potentiometer connected to Arduino as the controller of the speed of a video file uploaded to processing.
(Video used uploaded by Charles Icay )
For the Arduino code, I used the class example code for one variable from Arduino to processing. while the code for processing is as follows:
import processing.serial.*;
import processing.video.*;
Movie myMovie;
Serial myPort;
int valueFromArduino;
void setup() {
fullScreen();
// size(800,800);
background(0);
myMovie = new Movie(this, “dog.mp4”);
myMovie.loop();
printArray(Serial.list());
// this prints out the list of all available serial ports on your computer.
myPort = new Serial(this, Serial.list()[24], 9600);}
void movieEvent(Movie movie) {
myMovie.read(); }
void draw() {
while ( myPort.available() > 0) {
valueFromArduino = myPort.read(); }
println(valueFromArduino);//This prints out the values from Arduino
background (0);
image(myMovie, 0, 0);
float newSpeed = map(valueFromArduino, 0, 255, 0.1, 5);
myMovie.speed(newSpeed);}
The result was successful as I managed to make the video go faster and slower depending on the potentiometer values as show in the screen video below that was taken while I made the potentiometer values smaller and higher.
As the reading Computer Vision for Artist and Designers, explained “The intervening decades of research have yielded a great wealth of wellunderstood, lowlevel techniques that are able, under controlled circumstances, to extract meaningful information from a camera scene. These techniques are indeed elementary enough to be implemented by novice
programmers at the undergraduate or even highschool level.” which can be applied to today’s recitation, as just using a potentiometer, the computer vision can be modified as the user pleases. The ability for the user to change the computer vision as he pleases is the substance of interactivity as there is communication between the participant and the computer.