From 017326acc6dc95d95c84e7e1290ee47028a99175 Mon Sep 17 00:00:00 2001 From: Scott Fitzgerald Date: Wed, 29 Jan 2014 14:27:09 +0400 Subject: [PATCH 1/5] 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 --- build/shared/examples/04.Communication/Dimmer/Dimmer.ino | 1 + build/shared/examples/04.Communication/Graph/Graph.ino | 4 ++++ .../examples/04.Communication/PhysicalPixel/PhysicalPixel.ino | 1 + .../SerialCallResponse/SerialCallResponse.ino | 3 ++- .../SerialCallResponseASCII/SerialCallResponseASCII.ino | 1 + .../04.Communication/VirtualColorMixer/VirtualColorMixer.ino | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino index 78849c2c9..bbd27a8e5 100644 --- a/build/shared/examples/04.Communication/Dimmer/Dimmer.ino +++ b/build/shared/examples/04.Communication/Dimmer/Dimmer.ino @@ -55,6 +55,7 @@ void loop() { size(256, 150); println("Available serial ports:"); + // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); // Uses the first port in this list (number 0). Change this to diff --git a/build/shared/examples/04.Communication/Graph/Graph.ino b/build/shared/examples/04.Communication/Graph/Graph.ino index c2e4637b6..58c89994f 100644 --- a/build/shared/examples/04.Communication/Graph/Graph.ino +++ b/build/shared/examples/04.Communication/Graph/Graph.ino @@ -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); } diff --git a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino index 7ac8231a6..6204e09fe 100644 --- a/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino +++ b/build/shared/examples/04.Communication/PhysicalPixel/PhysicalPixel.ino @@ -84,6 +84,7 @@ void loop() { // You will need to choose the port that the Arduino board is // connected to from this list. The first port in the list is // port #0 and the third port in the list is port #2. + // if using Processing 2.1 or later, use Serial.printArray() println(Serial.list()); // Open the port that the Arduino board is connected to (in this case #0) diff --git a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino index dc004c9b2..11691ef8b 100644 --- a/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino +++ b/build/shared/examples/04.Communication/SerialCallResponse/SerialCallResponse.ino @@ -92,7 +92,8 @@ void setup() { xpos = width/2; ypos = height/2; - // Print a list of the serial ports, for debugging purposes: + // Print a list of the serial ports for debugging purposes + // 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 diff --git a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino index 3c6f94ed2..d8c94956f 100644 --- a/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino +++ b/build/shared/examples/04.Communication/SerialCallResponseASCII/SerialCallResponseASCII.ino @@ -91,6 +91,7 @@ void setup() { size(640,480); // 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 diff --git a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino index 39e4b5761..6a2cd1908 100644 --- a/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino +++ b/build/shared/examples/04.Communication/VirtualColorMixer/VirtualColorMixer.ino @@ -50,7 +50,9 @@ void loop() size(200, 200); // 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. From 9b86cb6e42cfdaec608340091f820d2e7407c934 Mon Sep 17 00:00:00 2001 From: Konrad Iturbe Date: Wed, 29 Jan 2014 21:57:29 +0100 Subject: [PATCH 2/5] Update readme.txt --- readme.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/readme.txt b/readme.txt index a260893fc..e66fe9f62 100644 --- a/readme.txt +++ b/readme.txt @@ -1,27 +1,31 @@ -Arduino is an open-source physical computing platform based on a simple i/o +Arduino +======== + +* Arduino is an open-source physical computing platform based on a simple i/o board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software on your computer (e.g. Flash, Processing, MaxMSP). The boards can be assembled by hand or purchased preassembled; the open-source IDE can be downloaded for free. -For more information, see the website at: http://www.arduino.cc/ +* For more information, see the website at: http://www.arduino.cc/ or the forums at: http://arduino.cc/forum/ -To report a *bug* in the software or to request *a simple enhancement* go to: +* To report a *bug* in the software or to request *a simple enhancement* go to: http://github.com/arduino/Arduino/issues -More complex requests and technical discussion should go on the Arduino Developers +* More complex requests and technical discussion should go on the Arduino Developers mailing list: https://groups.google.com/a/arduino.cc/forum/#!forum/developers -If you're interested in modifying or extending the Arduino software, we strongly +* If you're interested in modifying or extending the Arduino software, we strongly suggest discussing your ideas on the Developers mailing list *before* starting to work on them. That way you can coordinate with the Arduino Team and others, giving your work a higher chance of being integrated into the official release https://groups.google.com/a/arduino.cc/forum/#!forum/developers INSTALLATION +---------- Detailed instructions are in reference/Guide_Windows.html and reference/Guide_MacOSX.html. For Linux, see the Arduino playground: http://www.arduino.cc/playground/Learning/Linux From ede9b56407310c27448c1cfdf8f9393794ce14ce Mon Sep 17 00:00:00 2001 From: Konrad Iturbe Date: Wed, 29 Jan 2014 21:59:23 +0100 Subject: [PATCH 3/5] Update and rename readme.txt to README.mkdn --- readme.txt => README.mkdn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename readme.txt => README.mkdn (98%) diff --git a/readme.txt b/README.mkdn similarity index 98% rename from readme.txt rename to README.mkdn index e66fe9f62..115740137 100644 --- a/readme.txt +++ b/README.mkdn @@ -25,12 +25,13 @@ giving your work a higher chance of being integrated into the official release https://groups.google.com/a/arduino.cc/forum/#!forum/developers INSTALLATION ----------- +------------ Detailed instructions are in reference/Guide_Windows.html and reference/Guide_MacOSX.html. For Linux, see the Arduino playground: http://www.arduino.cc/playground/Learning/Linux CREDITS +-------- Arduino is an open source project, supported by many. The Arduino team is composed of Massimo Banzi, David Cuartielles, Tom Igoe, From 7ea7c5291dd25f2cdec332ce8e505cfc11de74bf Mon Sep 17 00:00:00 2001 From: Konrad Iturbe Date: Wed, 29 Jan 2014 22:18:24 +0100 Subject: [PATCH 4/5] Rename README.mkdn to README.md --- README.mkdn => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.mkdn => README.md (100%) diff --git a/README.mkdn b/README.md similarity index 100% rename from README.mkdn rename to README.md From 1c28dab57b1aaa1772ab91dd7d01ac89943aa556 Mon Sep 17 00:00:00 2001 From: Scott Fitzgerald Date: Sun, 2 Feb 2014 14:35:04 +0400 Subject: [PATCH 5/5] Updated Listfiles SD example Changed SS pin to 4 for consistency with other examples --- libraries/SD/examples/listfiles/listfiles.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/SD/examples/listfiles/listfiles.ino b/libraries/SD/examples/listfiles/listfiles.ino index 08ded5057..2bf8e6871 100644 --- a/libraries/SD/examples/listfiles/listfiles.ino +++ b/libraries/SD/examples/listfiles/listfiles.ino @@ -15,6 +15,8 @@ by David A. Mellis modified 9 Apr 2012 by Tom Igoe + modified 2 Feb 2014 + by Scott Fitzgerald This example code is in the public domain. @@ -38,7 +40,7 @@ void setup() // or the SD library functions will not work. pinMode(10, OUTPUT); - if (!SD.begin(10)) { + if (!SD.begin(4)) { Serial.println("initialization failed!"); return; }