Interfacing accelerometer and Processing

I joined the forum to ask pretty much the same question, if your serial port is COM4, you'll probably need to change where it says

myPort = new Serial(this, Serial.list()[0], baudRate);

to

myPort = new Serial(this, Serial.list()[1], baudRate);

The bit in the [] is the port number, on my machine, COM4 is port 1, COM3 is 0, yours might be different i guess, but if you fiddle with that number you should get it going soon enough!