SerialUSB com error on Arduino DUE

also i suggest you comment these lines out for now until you have it all working properly.

  //Serial.setTimeout(2);
  //SerialUSB.setTimeout(6);
  //Serial1.setTimeout(6);

The exact behavior of setTimeout() is not quite clear to me.