code: function printList(serialList) {
    menu = createSelect();
    var title = createElement('option', 'Choose a port:');
    menu.child(title);
    menu.position(10, 10);
    menu.changed(openPort);
    for (var i = 0; i < serialList.length; i++) {
      var thisOption = createElement('option', serialList[i]);
      thisOption.value = serialList[i];
      menu.child(thisOption);
      println(i + " " + serialList[i]);
    }
  }
docs: Got the list of ports