Hi,
Sorry about the confusion. In order to be consistent with the rest of the tutorial, I have modified the tutorial’s code in the section “…to Processing” [
https://learn.sparkfun.com/tutorials/co ... processing ] to include
void setup(){}
I changed this part of the tutorial:
--------------------------------------------------
For our `setup()` method in Processing, we're going to find the serial port our Arduino is connected to and set up our Serial object to listen to that port.
Code: Select all // I know that the first port in the serial list on my mac
// is Serial.list()[0].
// On Windows machines, this generally opens COM1.
// Open whatever port is the one you're using.
String portName = Serial.list()[0]; //change the 0 to a 1 or 2 etc. to match your port
myPort = new Serial(this, portName, 9600);
--------------------------------------------------
to:
--------------------------------------------------
For our `setup()` method in Processing, we're going to find the serial port our Arduino is connected to and set up our Serial object to listen to that port.
Code: Select all void setup()
{
// I know that the first port in the serial list on my mac
// is Serial.list()[0].
// On Windows machines, this generally opens COM1.
// Open whatever port is the one you're using.
String portName = Serial.list()[0]; //change the 0 to a 1 or 2 etc. to match your port
myPort = new Serial(this, portName, 9600);
}
--------------------------------------------------