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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user