Serial write to Arduino

edited October 2013 in Arduino

I'm trying to control my Arduino Uno with Processing for the first time. I get an error on line "String portName = Serial.list()[3];". I know that the Arduino is using Com3. The error is "ArrayIndexOutOfBoundsException:3". I assume I'm not entering this line correctly. The examples are by someone using an Apple, so maybe I'm typing the port number wrong.


  • edited October 2013 Answer ✓


    println( Serial.list() );

    and look at the console output. You should see all available ports there.

    ArrayIndexOutOfBounds means that the array (what Serial.list() returns) you are referencing does not have an entry at the position given in [].

  • That was it. Thank you fjen

Sign In or Register to comment.