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 [2015/01/15 12:03]
fbonowski [Mit Processing Daten von der Seriellen Schnittstelle empfangen]
techniken:datenaustausch:processingserialread [2016/11/16 13:49] (aktuell)
fbonowski
Zeile 35: Zeile 35:
  
 </​code>​ </​code>​
-====== Beispielcode:​ ======+====== Beispielcode ​Empfang von Zahlenwerten: ======
  
 <file Java receiveDataSerial.pde>​ <file Java receiveDataSerial.pde>​
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.1421319834.txt.gz · Zuletzt geändert: 2016/01/21 12:45 (Externe Bearbeitung)