Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How do I use processing, makey makey and conductive paint to play a video when a object is touched?

$
0
0

Hello all,

I am very new to Processing so would appreciate your help.

I have 4 objects painted with BARE conductive electric paint. I have 4 short video clips for each object. Each object has its own video clip. I need a video clip to play when an object is being continuously touched, and for it to pause when the hand is taken off the object.

I have connected a Makey Makey + Alligator clips to the conductive painted objects and also the space bar on the makey makey board. I used the paint on the table surface, so when touching this and the painted object the cursor space is moving in a text doc (just to test).

One of my videos is called M1.mov

The code I was give by a helpful person was the following:

import processing.video.*;
Movie M1;

boolean show=false;

void setup() {
  size(640, 360);
  background(255);
  M1 = new Movie(this, "transit.mov");
  M1.loop();
  M1.pause();

}

void draw() {
  background(0);
  if(show==true) image(M1, 0, 0);
}

void keyPressed() {

  if (key == 'r') {
    M1.play();
    show=true;
  }

}
void keyReleased(){
  M1.pause();
  show=false;
}

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

However I get the following error message:

2017-02-24 20:47:31.423 java[13687:2040623] 20:47:31.423 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.

Many thanks to all who can help, Vara


Viewing all articles
Browse latest Browse all 2896

Trending Articles