You could put some debug code in the loop:
if( list.length < 2)
println(val);
Or if the length is less than 2, reread the port.
You could put some debug code in the loop:
if( list.length < 2)
println(val);
Or if the length is less than 2, reread the port.