We are about to switch to a new forum software. Until then we have removed the registration on this forum.
At the time i dont have the arduino or the light sensors, i will only work on that tomorrow =/. But at processing i'm trying some stuff. The idea is to have a video always in loop, but every time i take the light of a sensor (either if i put my finger on the sensor or a cloth) it show's another video, but when that sensor got light again it goes to the loop video.
This is what i got so far, still missing the keyPressed as a substitute of the sensors. The problem is the videos are all runing ate the same the time, and i've no idea how to do the keyPressing to call the other videos. Its the first time i'm using this library, and i really need help on this.
import processing.video.*; String[] movieList = {"movie/x.mov", "movie/y.mov", "movie/w.mov", "movie/z.mov"}; Movie[] filmes = new Movie[movieList.length]; void setup() { size(1280, 720); //fullScreen(); background (0); frameRate(60); for (int i = 0; i < movieList.length; i++) { filmes[i] = new Movie(this, movieList[i]); filmes[i].loop(); } } void draw() { for (int i = 0; i < movieList.length; i++) { image(filmes[i], 0, 0); } } void movieEvent(Movie m) { m.read(); }
Answers
https://forum.Processing.org/two/discussions/tagged?Tag=movieevent()
I'm already trying to connect arduino with processing, but i'm stuck now. I will work with 5 LDR Sensor and i need to every time i take the light in one of the sensors, that sensor will show a Video. How do i do that? This is all the code i got so far.
I got a void keyPressed, cause at the time i was doing some tests
Arduino
Processing
Arrays are our best friends. Shorten our code and allows us to use loops w/ numerical indices: O:-)
https://forum.Processing.org/two/discussion/8082/from-several-variables-to-arrays
So i've been changing my code in arduino. But i'm getting a problem i cant see resolve because e can't find my problem. When i run the code i always got the same numbers "1100". But what i want to see, is every time i put my finger on one of the LDR sensor is, " LDRValue1 A FUNCIONAR 1 " (i put the 1 here as an example).