From d8f781210a3c43bec1d7f7713d2aa9c540118e67 Mon Sep 17 00:00:00 2001 From: Paint Your Dragon Date: Mon, 21 Nov 2011 12:00:49 -0800 Subject: [PATCH] Disabled auto-detect as default case; doesn't work with certain boards --- Processing/Adalight/Adalight.pde | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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();