Reading MPU6050 from Processing

Thanks for replying!

When I printed the list just appeared 2 ports, which don’t seem to be the I2C port.

This is the code I’m trying to run:

void setup()
{
 size(1000,400);
 smooth();
 printArray(Serial.list());
 port = new Serial(this, Serial.list()[0], 9600);
 print(port.available());
}

with this output

[0] "/dev/serial1"
[1] "/dev/ttyAMA0"
RuntimeException: Error opening serial port /dev/serial1: Port busy
RuntimeException: Error opening serial port /dev/serial1: Port busy
RuntimeException: Error opening serial port /dev/serial1: Port busy

But with the first execution just print a 0 on port.available()

Thanks!