import processing.serial.*; //set the background color int backgroundColor= 255; //name the serial port for refference later in this code Serial myPort; int pulse; void setup() { //serial set up println(Serial.list()); //initialize the serial port and assign it to the myPort variable myPort = new Serial(this, Serial.list()[1], 9600); float a=sqrt(2); //stage setup //set the stage size size(800, 800); } void draw() { //this colors the background using the backgroundColor from above background(backgroundColor); noStroke(); smooth(); fill(pulse*30, random(71), random(152)); ellipse(400, 400, pulse*100, pulse*100); delay(80); } //bring the serial information into your application void serialEvent(Serial myPort) { pulse = myPort.read(); // print the serial data. println(pulse); }