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; }