A better pattern for initializing the Serial communication would be to accept a String portName as input for serialPort instead of a index number for the constructor function. Now this gives unnecessary confusion.
The Serial.list() method is mentioned in the FAQ of the instructions, but it would be nice to integrate this in the example.
A better pattern for initializing the Serial communication would be to accept a
String portName
as input forserialPort
instead of a index number for the constructor function. Now this gives unnecessary confusion.The
Serial.list()
method is mentioned in the FAQ of the instructions, but it would be nice to integrate this in the example.