diff --git a/magic_veneer_processing/.vscode/tasks.json b/magic_veneer_processing/.vscode/tasks.json new file mode 100644 index 0000000..6e22ba9 --- /dev/null +++ b/magic_veneer_processing/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run Sketch", + "type": "shell", + "group": { + "kind": "build", + "isDefault": true + }, + "command": "${config:processing.path}", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "dedicated" + }, + "args": [ + "--force", + "--sketch=${workspaceRoot}", + "--output=${workspaceRoot}/out", + "--run" + ], + "windows": { + "type": "process", + "args": [ + "--force", + { + "value": "--sketch=${workspaceRoot}", + "quoting": "strong" + }, + { + "value": "--output=${workspaceRoot}\\out", + "quoting": "strong" + }, + "--run" + ] + } + } + ] +} diff --git a/magic_veneer_processing/magic_veneer_processing.pde b/magic_veneer_processing/magic_veneer_processing.pde index ee12aae..fbb85f0 100644 --- a/magic_veneer_processing/magic_veneer_processing.pde +++ b/magic_veneer_processing/magic_veneer_processing.pde @@ -9,29 +9,28 @@ int radius = 0; void setup() { /* Set up screen */ fullScreen(); - background(255); - - /* Set up communication with arduino */ + background(0); + + /* Set up communication with arduino String portName = Serial.list()[Serial.list().length - 1]; //change index to match your port - arduinoPort = new Serial(this, portName, 9600); + arduinoPort = new Serial(this, portName, 9600); */ } void draw() { - background(255); - - if ( arduinoPort.available() > 0) { + println("Test"); + /* if ( arduinoPort.available() > 0) { String rec = arduinoPort.readStringUntil('\n'); if (rec != null) { receivedMessage = rec; } - + // Check for specific events and act upon them if (receivedMessage != null && receivedMessage.contains("isWithinThreshhold")) { cameIntoThreshhold = true; } } - + circle(width / 2, height / 2, radius); fill(0); - radius += 10; + radius += 10; */ } diff --git a/magic_veneer_processing/out/magic_veneer_processing.class b/magic_veneer_processing/out/magic_veneer_processing.class new file mode 100644 index 0000000..597b1f9 Binary files /dev/null and b/magic_veneer_processing/out/magic_veneer_processing.class differ diff --git a/magic_veneer_processing/out/source/magic_veneer_processing.java b/magic_veneer_processing/out/source/magic_veneer_processing.java new file mode 100644 index 0000000..1ecc9bf --- /dev/null +++ b/magic_veneer_processing/out/source/magic_veneer_processing.java @@ -0,0 +1,64 @@ +import processing.core.*; +import processing.data.*; +import processing.event.*; +import processing.opengl.*; + +import processing.serial.*; + +import java.util.HashMap; +import java.util.ArrayList; +import java.io.File; +import java.io.BufferedReader; +import java.io.PrintWriter; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.IOException; + +public class magic_veneer_processing extends PApplet { + + + +Serial arduinoPort; +String receivedMessage; +boolean cameIntoThreshhold = false; + +int radius = 0; + +public void setup() { + /* Set up screen */ + + background(0); + + /* Set up communication with arduino + String portName = Serial.list()[Serial.list().length - 1]; //change index to match your port + arduinoPort = new Serial(this, portName, 9600); */ +} + +public void draw() { + println("Test"); + /* if ( arduinoPort.available() > 0) { + String rec = arduinoPort.readStringUntil('\n'); + if (rec != null) { + receivedMessage = rec; + } + + // Check for specific events and act upon them + if (receivedMessage != null && receivedMessage.contains("isWithinThreshhold")) { + cameIntoThreshhold = true; + } + } + + circle(width / 2, height / 2, radius); + fill(0); + radius += 10; */ +} + public void settings() { fullScreen(); } + static public void main(String[] passedArgs) { + String[] appletArgs = new String[] { "magic_veneer_processing" }; + if (passedArgs != null) { + PApplet.main(concat(appletArgs, passedArgs)); + } else { + PApplet.main(appletArgs); + } + } +}