code: function gotData() {
    var currentString = serial.readLine();  // read the incoming string
    trim(currentString);                    // remove any trailing whitespace
    if (!currentString) return;             // if the string is empty, do no more
    console.log(currentString);             // println the string
    latestData = currentString;            // save it for the draw method
  }
docs: There is data available to work with from the serial port