Benutzer-Werkzeuge

Webseiten-Werkzeuge


techniken:datenaustausch:processingserialread

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
techniken:datenaustausch:processingserialread [2016/08/03 17:22]
fbonowski [Beispielcode:]
techniken:datenaustausch:processingserialread [2016/11/16 13:49] (aktuell)
fbonowski
Zeile 50: Zeile 50:
  
   // Initialze Serial communication. There may be multiple serial ports on your computer, so we have to select one:   // Initialze Serial communication. There may be multiple serial ports on your computer, so we have to select one:
-  String[] portNames=Serial.list();//​Serial.list() returns an array of port names+  String[] portNames=Serial.list();//​Serial.list() returns an array of port names    
 +  // if there is no serial port, quit with an error message 
 +  if (portNames.length==0){throw(new IllegalStateException("​There are no Serial ports on this computer!"​));​} ​
   println(portNames); ​ //print them to the user   println(portNames); ​ //print them to the user
   // initialize the Serial port Object using the last name from the list and a Baudrate of 9600   // initialize the Serial port Object using the last name from the list and a Baudrate of 9600
techniken/datenaustausch/processingserialread.1470237766.txt.gz · Zuletzt geändert: 2016/08/03 17:22 von fbonowski