import processing.serial.*;

Serial myPort;  // Create object from Serial class
String val;     // Data received from the serial port
float r=0.1;
void setup()
{
  String portName = Serial.list()[1]; //change the 0 to a 1 or 2 etc. to match your port
  myPort = new Serial(this, portName, 9600);
  size(640, 640);
  background(255);
  noStroke();
}

void draw()
{
  if ( myPort.available() > 0) 
  {  // If data is available,
  val = myPort.readStringUntil('\n');         // read it and store it in val
  r = float(val);
  } 
println(val); //print it out in the console



strokeWeight(10);
fill(255,255,255);
stroke(255, 69, 0);
ellipse(320,320,550,550);



fill(255,200,200);
noStroke();
ellipse(320,320,6*r,6*r);

delay(100);
}
