string array com ports
in
Programming Questions
•
2 years ago
hello, I'm trying to select the com port I want with buttons on the screen.
to do this I use serial.list()
String serlist = new String[10];
void setup(){
serlist = serial.list();
}
now, if I access serlist[0], I get "COM1" and it's ok because it exists but
if I access serlist[1], the program crashes because there's nothing inside serlist[1]
how can I check which is the last com port of the list?
1