132
edits
No edit summary |
No edit summary |
||
Line 96: | Line 96: | ||
void setup() { | void setup() { | ||
size(640,480,P2D); | size(640,480,P2D); | ||
frameRate(30); | frameRate(30); | ||
myMovie = new Movie(this, "video.mov"); | myMovie = new Movie(this, "video.mov"); | ||
myMovie.loop(); | myMovie.loop(); | ||
println(Serial.list()); | println(Serial.list()); | ||
myPort = new Serial(this,"/dev/tty.usbmodem411",9600); | myPort = new Serial(this,"/dev/tty.usbmodem411",9600); | ||
} | } | ||
void movieEvent(Movie myMovie) { | void movieEvent(Movie myMovie) { | ||
myMovie.read(); | myMovie.read(); | ||
} | } | ||
void draw() { | void draw() { | ||
while(myPort.available() > 0){ | while(myPort.available() > 0){ | ||
incomingVal = myPort.read(); | incomingVal = myPort.read(); | ||
println(incomingVal); | println(incomingVal); | ||
} | } | ||
if(myMovie.available()){ | if(myMovie.available()){ | ||
} | } | ||
image(myMovie, 0, 0); | image(myMovie, 0, 0); | ||
} | } | ||
void mousePressed(){ | void mousePressed(){ | ||
myMovie.jump(incomingVal); | myMovie.jump(incomingVal); | ||
} | } | ||
Line 129: | Line 130: | ||
[[File:wedding7.jpg| | [[File:wedding7.jpg|600px|]] | ||
[[File:wedding4.jpg|400px|]] | [[File:wedding4.jpg|400px|]] |
edits