/* * *Program will make the circle bigger each time a new serial data *arrives to Processing. *More info: *http://www.iua.upf.es/~jlozano/interfaces/blow_sensor.html *Jose Lozano * * */ import processing.serial.*; String portname = "COM8"; Serial port; int val=0; void setup() { size(800, 800); background(0); smooth(); // Open serial port / Abrir puerto serie port = new Serial(this, portname, 57600); } void draw() { if (port.available() > 0) { port.clear(); val = val + 5; fill(204, 102, 0); ellipse(width/2, height/2, val,val); } } void mousePressed() { //To clear screen press mouse background(0); val = 0; }