1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Minor changes to Communication Examples

Added a note to the included Processing sketches about replacing
println(Serial.list()) with Serial.printArray() if using Processing 2.1
or later
This commit is contained in:
Scott Fitzgerald
2014-01-29 14:27:09 +04:00
parent a432e26861
commit 017326acc6
6 changed files with 11 additions and 1 deletions

View File

@ -63,13 +63,17 @@ void loop() {
size(400, 300);
// List all the available serial ports
// if using Processing 2.1 or later, use Serial.printArray()
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Arduino, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[0], 9600);
// don't generate a serialEvent() unless you get a newline character:
myPort.bufferUntil('\n');
// set inital background:
background(0);
}