Hi guys. I am attempting to use capacitive sensors that trigger a video on Processing. It works wonderfully when connected to my laptop but I want to project the video onto a TV screen. When I hook up my tv to my laptop using the display port, the capacitive sensors stop working. When I do a serial print line, it shows that it’s not sensing anything at all when hooked up to the TV, but when it’s just my laptop it senses everything just fine. Do you know what I can do to fix this issue? Here is my code:
import processing.video.*;
import processing.serial.*;
Serial myPort; // Create object from Serial class
int val; // Data received from the serial port
static final int QTY = 2; // quanty of files
final Movie[] movies = new Movie[QTY]; // makes an array of previusly declared qty
int idx; // index for a file that you want to play
int n;
void setup() {
frameRate(30);
size(1280, 800);
movies[0] = new Movie(this, "ATF.mp4");
movies[1] = new Movie(this, "LP_HD.mp4");
movies[0].stop();
movies[1].stop();
// I know that the first port in the serial list on my mac
// is always my FTDI adaptor, so I open Serial.list()[0].
// On Windows machines, this generally opens COM1.
// Open whatever port is the one you're using.
String portName = Serial.list()[1];
//println(portName); // to check if this is your arduino usb port
myPort = new Serial(this, portName, 28800);
}
void draw(){
if ( myPort.available() > 0) { // If data is available,
val = myPort.read(); // read it and store it in val
println(val);
}
set(0, 0, movies[idx]);
//println(val);
if (val == 0) { // If the serial value is 0,
idx = val; // indx is 0 here
n = 1;
movies[idx].pause();
movies[idx = n].loop();
} else { // If the serial value is not 0,
idx = val;
n = idx - 1;
movies[idx].pause();
movies[idx = n].loop();
}
}
void movieEvent(Movie m) {
m.read();
}