PCOMP video project beginning

Like ICM, I talked about a couple of ideas for PCOMP final in class on Wednesday, and comments after class made me think the video project would be better to pursue.  I tried to test some things today.  I couldn’t get all the material I wanted, but I was able to get some mylar from Canal Plastics, which I used with a stripped wire and penny to create a potentiometer like the one on kit of no parts.  I ordered some copper to make a better one and to make speakers if I have time.  I used a small strip, and got pretty inconsistent values, but I was able to get a reading.

This is a chart of the values I got.

Then I tested controlling the video with a potentiometer.  I found that using the little blue pot from our kits the values fluctuated a lot.  To get a more stable rate I got a bigger metal pot from the bins and reduced the resolution on the Arduino Serial output.  By giving fewer values from the values from 0 to 1023, there was lessing jumping around.

Here is me playing with a video piece that I made last winter with the Processing and the poteniometer.

[yframe url=’http://www.youtube.com/watch?v=jY1LFjD-5vk’%5D

The Arduino code was just the basic Multiple Serial out lab.  Here’s my processing code:

import processing.video.*;
import processing.serial.*;

Movie myMovie;
Serial port;

float framePos = 0;
float videoX = 0;
float videoY = 0;

void setup() {
  size(480, 288);
  frameRate(30);
  myMovie = new Movie(this, "onlysea1.mov");
  myMovie.loop();

 println(Serial.list());
  String portName = Serial.list()[0];
  port = new Serial(this, portName, 9600);
  port.bufferUntil('n');
}

void draw() {
  background(0);
  if (myMovie.available()) {
    myMovie.read();
  }
  image(myMovie, 0, -videoY);
  //myMovie.jump(framePos);
}

void serialEvent (Serial myPort) {
  String myString = myPort.readStringUntil('n');
  if (myString != null) {
  }
  myString = trim(myString);
  int sensors[] = int(split(myString, ','));
  for (int i = 0; i < sensors.length; i++) {
    videoY = map(sensors[0], 0, 255, 0, myMovie.width);

  }
}
Advertisements

Author: owen ribbit

poop

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s