Browse Source

setup application

develop
Leandro Estrella rPi 6 years ago
parent
commit
4e4df7f474
  1. 10
      .gitignore
  2. 12
      ephimera/ephimera.pde
  3. 0
      ephimera/frames.pde
  4. 0
      ephimera/history/shot_20190927_175024.gif
  5. 0
      ephimera/history/shot_20190927_175028.gif
  6. 0
      ephimera/percentage.pde
  7. 0
      ephimera/serial.pde

10
.gitignore

@ -1,9 +1,5 @@
.DS_Store
applet applet
application.linux32
application.linux64
application.windows32
application.windows64
application.macosx
application.*
ephimera/data/
ephimera/data/*
ephimera/history/*

12
ephimera/ephimera.pde

@ -9,7 +9,7 @@ Serial port;
//Capture video; //Capture video;
GLCapture video; GLCapture video;
PImage img; PImage img;
boolean countingColors = false, makeBackup = false, takePicture = true;
boolean takePicture = true;
int videoWidth = 480; int videoWidth = 480;
int videoHeight = 240; int videoHeight = 240;
@ -17,14 +17,14 @@ int sending = 0;
void setup() { void setup() {
size(480, 240, P2D); size(480, 240, P2D);
frameRate(2);
frameRate(10);
colorMode(HSB, 100, 100, 100); colorMode(HSB, 100, 100, 100);
String portName = Serial.list()[0]; String portName = Serial.list()[0];
port = new Serial(this, portName, 9600); port = new Serial(this, portName, 9600);
String[] cameras = GLCapture.list(); String[] cameras = GLCapture.list();
video = new GLCapture(this, cameras[0], width, height, 30);
video = new GLCapture(this, cameras[0], width, height, 10);
video.start(); video.start();
GPIO.pinMode(4, GPIO.INPUT); GPIO.pinMode(4, GPIO.INPUT);
@ -33,23 +33,27 @@ void setup() {
// video.start(); // video.start();
background(0); background(0);
delay(2000);
} }
void draw() { void draw() {
ephPercentage(); ephPercentage();
if (GPIO.digitalRead(4) == GPIO.LOW && takePicture == true){ if (GPIO.digitalRead(4) == GPIO.LOW && takePicture == true){
takePicture = false; takePicture = false;
video.pause();
delay(4000); delay(4000);
video.pause();
makePicture(); makePicture();
} }
if(GPIO.digitalRead(4) == GPIO.HIGH && takePicture == false){ if(GPIO.digitalRead(4) == GPIO.HIGH && takePicture == false){
takePicture = true; takePicture = true;
video.start(); video.start();
} }
} }
void keyPressed() { void keyPressed() {

0
ephimera/frames.pde

0
ephimera/history/shot_20190927_175024.gif

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
ephimera/history/shot_20190927_175028.gif

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
ephimera/percentage.pde

0
ephimera/serial.pde

Loading…
Cancel
Save