From 6db53bfdeea7b82f8b0399bcab73c4bf77e72675 Mon Sep 17 00:00:00 2001 From: Dennis Schoepf Date: Thu, 17 Sep 2020 14:04:34 +0200 Subject: [PATCH] Add test shape --- .../magic_veneer_processing.pde | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/magic_veneer_processing/magic_veneer_processing.pde b/magic_veneer_processing/magic_veneer_processing.pde index 72d1e23..ee12aae 100644 --- a/magic_veneer_processing/magic_veneer_processing.pde +++ b/magic_veneer_processing/magic_veneer_processing.pde @@ -4,12 +4,21 @@ Serial arduinoPort; String receivedMessage; boolean cameIntoThreshhold = false; +int radius = 0; + void setup() { - String portName = Serial.list()[Serial.list().length - 1]; //change the 0 to a 1 or 2 etc. to match your port + /* Set up screen */ + fullScreen(); + background(255); + + /* 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); } void draw() { + background(255); + if ( arduinoPort.available() > 0) { String rec = arduinoPort.readStringUntil('\n'); if (rec != null) { @@ -21,4 +30,8 @@ void draw() { cameIntoThreshhold = true; } } + + circle(width / 2, height / 2, radius); + fill(0); + radius += 10; }