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.

44 lines
722 B

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