processing code?

Hi,

I have also not been able to get this to work myPort = new Serial(this, Serial.list()[2], 9600);

Try it wihout the [2].

If again no joy try this:
When I tried the same code on one of my projects a while ago, I had to use this instead:

import processing.serial.*;
Serial myPort;


void setup() 
{
  size(800, 800); // pane size
  
myPort = new Serial(this, "COMn", 9600);

wher "n" is the port number. Use whatever you are using for port eg 2.