diff --git a/Processing/Adalight/Adalight.pde b/Processing/Adalight/Adalight.pde index 9911cce..cdcbe64 100644 --- a/Processing/Adalight/Adalight.pde +++ b/Processing/Adalight/Adalight.pde @@ -121,8 +121,20 @@ void setup() { float f, startX, curX, curY, incX, incY; dh = new DisposeHandler(this); // Init DisposeHandler ASAP - // Comment out this line to test the software without Arduino: - port = openPort(); // Open serial port to Arduino + + // Open serial port. As written here, this assumes the Arduino is the + // first/only serial device on the system. If that's not the case, + // change "Serial.list()[0]" to the name of the port to be used: + port = Serial(this, Serial.list()[0], 115200); + // Alternately, in certain situations the following line can be used + // to detect the Arduino automatically. But this works ONLY with SOME + // Arduino boards and versions of Processing! This is so convoluted + // to explain, it's easier just to test it yourself and see whether + // it works...if not, leave it commented out and use the prior port- + // opening technique. + // port = openPort(); + // And finally, to test the software alone without an Arduino connected, + // don't open a port...just comment out the serial lines above. // Initialize screen capture code for each display's dimensions: ge = GraphicsEnvironment.getLocalGraphicsEnvironment();