import processing.serial.*; //import serial library
Serial myPort;  // Create object from Serial class
int val;      // Data received from the serial port

void setup()
{ 
  
  
  String portName = Serial.list()[0];
  //printArray(Serial.list());
  myPort = new Serial(this, portName, 115200);
  // Set baud rate equal to microprocessor


size(640, 640);
background(255);
noStroke();

}

void draw()
{
  while ( myPort.available() > 0) {  // If data is available,
    val = myPort.read();   // read it and store it in val
    println(val);
  }
  strokeWeight(10);
fill(255,255,255);
stroke(255, 69, 0);
ellipse(328,320,550,550);
if (val == 1) {              // If the serial value is 0,
    fill(0);                   // set fill to black
  } 
  else {                       // If the serial value is not 0,
    fill(255,200,200);                 // set fill to light gray
    noStroke();
ellipse(320,320,250,250);
  }



    }
