Hi, I'm going through the basic tutorial on https://learn.bela.io/products/trill/integrating-trill-into-your-projects/
to connect a Trill sensor to Arduino to Processing and it doesn't' work
TRill arduino works fine. But when I start the Processing sketch after starting the Arduino sketch It can't open the com port
It highlights this line in the code
String portName = Serial.list()[gPortNumber];
and this error message
Available ports:
COM3
ArrayIndexOutOfBoundsException: 2
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.
I've tried changing
int gPortNumber = 1; // Port number from 2 to even 1and no change other than the array indexoutofboundsexception number in the error changes to the same number
I've tried both TrillRing and TrillSquare examples in Processing
Basic Arduino to Processing sketch communication as done here works fine
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all
What am I missing to get this to work?