You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

43 lines
722 B

import processing.io.*;
import processing.serial.*;
import processing.video.*;
import processing.serial.*;
Serial port;
Capture video;
PImage img;
int videoWidth = 640;
int videoHeight = 480;
int sending = 0;
void setup() {
size(640, 480, P2D);
frameRate(2);
colorMode(HSB, 100, 100, 100);
String portName = Serial.list()[0];
port = new Serial(this, portName, 9600);
video = new Capture(this, width, height);
video.start();
background(0);
}
void draw() {
//ephPercentage();
}
void keyPressed() {
if (key == 'S' || key == 's') {
video.stop();
makePicture();
}
if (key == 'B' || key == 'b') {
backupFrame();
}
if (key == 'G' || key == 'g') {
video.start();
}
}