import processing.serial.*; // The serial port: Serial myPort; PImage shadowImage; void setup() { size(500, 500); // List all the available serial ports: shadowImage = loadImage("cmavros.jpg"); print("Serial port is "); println(Serial.list()); /* I know that the first port in the serial list on my mac is always my Keyspan adaptor, so I open Serial.list()[0]. Open whatever port is the one you're using. */ myPort = new Serial(this, Serial.list()[0], 9600); println(myPort); } void draw() { image(shadowImage, 0, 0); while (myPort.available () > 0) { int inByte = myPort.read(); if (inByte>4) { println(inByte); tint(300-inByte,0,inByte+100); image(shadowImage, 0, 0); } } }