From 4e4df7f474fff676c89f315132b119a7726b2e77 Mon Sep 17 00:00:00 2001 From: Leandro Estrella rPi Date: Sat, 5 Oct 2019 12:45:23 +0200 Subject: [PATCH] setup application --- .gitignore | 10 +++------- ephimera/ephimera.pde | 12 ++++++++---- ephimera/frames.pde | 0 ephimera/history/shot_20190927_175024.gif | Bin ephimera/history/shot_20190927_175028.gif | Bin ephimera/percentage.pde | 0 ephimera/serial.pde | 0 7 files changed, 11 insertions(+), 11 deletions(-) mode change 100644 => 100755 ephimera/frames.pde mode change 100644 => 100755 ephimera/history/shot_20190927_175024.gif mode change 100644 => 100755 ephimera/history/shot_20190927_175028.gif mode change 100644 => 100755 ephimera/percentage.pde mode change 100644 => 100755 ephimera/serial.pde diff --git a/.gitignore b/.gitignore index 1ed9360..7701223 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -.DS_Store applet -application.linux32 -application.linux64 -application.windows32 -application.windows64 -application.macosx +application.* -ephimera/data/ +ephimera/data/* +ephimera/history/* diff --git a/ephimera/ephimera.pde b/ephimera/ephimera.pde index e773671..4b2d253 100644 --- a/ephimera/ephimera.pde +++ b/ephimera/ephimera.pde @@ -9,7 +9,7 @@ Serial port; //Capture video; GLCapture video; PImage img; -boolean countingColors = false, makeBackup = false, takePicture = true; +boolean takePicture = true; int videoWidth = 480; int videoHeight = 240; @@ -17,14 +17,14 @@ int sending = 0; void setup() { size(480, 240, P2D); - frameRate(2); + frameRate(10); colorMode(HSB, 100, 100, 100); String portName = Serial.list()[0]; port = new Serial(this, portName, 9600); String[] cameras = GLCapture.list(); - video = new GLCapture(this, cameras[0], width, height, 30); + video = new GLCapture(this, cameras[0], width, height, 10); video.start(); GPIO.pinMode(4, GPIO.INPUT); @@ -33,23 +33,27 @@ void setup() { // video.start(); background(0); + delay(2000); } void draw() { ephPercentage(); + if (GPIO.digitalRead(4) == GPIO.LOW && takePicture == true){ takePicture = false; - video.pause(); delay(4000); + video.pause(); makePicture(); } + if(GPIO.digitalRead(4) == GPIO.HIGH && takePicture == false){ takePicture = true; video.start(); } + } void keyPressed() { diff --git a/ephimera/frames.pde b/ephimera/frames.pde old mode 100644 new mode 100755 diff --git a/ephimera/history/shot_20190927_175024.gif b/ephimera/history/shot_20190927_175024.gif old mode 100644 new mode 100755 diff --git a/ephimera/history/shot_20190927_175028.gif b/ephimera/history/shot_20190927_175028.gif old mode 100644 new mode 100755 diff --git a/ephimera/percentage.pde b/ephimera/percentage.pde old mode 100644 new mode 100755 diff --git a/ephimera/serial.pde b/ephimera/serial.pde old mode 100644 new mode 100755