// Example modified from one by Tom Igoe //http://processing.org/reference/libraries/serial/Serial_read_.html //be sure to go through this hooplah if you want serial to work in processing: //http://processing.org/faq/bugs.html#serial import processing.serial.*; Serial myPort; // The serial port void setup() { // framerate(50); // size(800,200); // background(0); //time = oldtime = 0; //SERIAL WANKING // List all the available serial ports println(Serial.list()); // I know that the 3rd port in the serial list on my mac // is always my Keyspan adaptor, so I open Serial.list()[2]. // Open whatever port is the one you're using. myPort = new Serial(this, Serial.list()[2], 2400); } void draw() { println(myPort.read()); }