From ae5d5c0c00499a63aea2ccfa6f6882e0446081a2 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Sun, 1 Apr 2012 12:59:00 -0400 Subject: [PATCH] modified StringSubstring example to add gating on port readiness --- .../examples/08.Strings/StringSubstring/StringSubstring.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino index 2197b248d..56327c8ea 100644 --- a/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino +++ b/build/shared/examples/08.Strings/StringSubstring/StringSubstring.ino @@ -3,7 +3,7 @@ Examples of how to use substring in a String - created 27 July 2010 + created 27 July 2010, modified 1 April 2012 by Tom Igoe http://arduino.cc/en/Tutorial/StringSubstring @@ -13,6 +13,9 @@ void setup() { Serial.begin(9600); + // Wait for port to be opened: + while (!Serial) + ; Serial.println("\n\nString substring():"); }