I am really new to Processing and have worked with Arduino a little before, so please bear with me on my beginner questions.
I am trying to make a tilt sensor (connected to an arduino) cause a video to start and stop. I've had LOTS of trouble getting a video to load (no idea how to determine image coordinates...it seems really arbitrary), but have managed a somewhat successful video just using basic video loop code.
I downloaded the Arduino library into Processing so I could just download the Firmata sketch onto the Arduino and write code for Processing (instead of writing code for both). It doesn't work, so I'm begging for any guidance on this one. What happens is this: I press run, there is static noise, and the first frame of the movie appears frozen. Then the static stops and the sketch "unexpectedly quits." It happens every time.
if (arduino.digitalRead(inPin) == Arduino.HIGH) myMovie.play(); else myMovie.stop();
image(myMovie, 200, 206);
}
I'm working on a tight deadline and am BEGGING for any and all help. I'm curious if this has to do with debouncing the tilt switch (it is recommended to do so, btu I had to bypass the code since it's in Processing instead of Arduino).