Skip to content

Commit

Permalink
rename, static var that might outlast function
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Anderson committed Jul 24, 2012
1 parent 3c4c107 commit 52adcd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions effects/foo/foo.ino → effects/serial/serial.ino
@@ -1,9 +1,6 @@
/* USB to Serial - Teensy becomes a USB to Serial converter
http://dorkbotpdx.org/blog/paul/teensy_as_benito_at_57600_baud
You must select Serial from the "Tools > USB Type" menu
This example code is in the public domain.
/*
Example of getting commands over USB serial.
Must select Serial from the "Tools > USB Type" menu.
*/

#define MY_TYPE "START"
Expand Down Expand Up @@ -56,9 +53,11 @@ int parseCommand(const String &cmd)
return mask;
}

// must be outside of function, http://arduino.cc/forum/index.php?topic=73177.0
static String command = "";

String getCommand()
{
String command = "";
char c;
while (Serial.available()) {
c = Serial.read();
Expand Down
File renamed without changes.

0 comments on commit 52adcd8

Please sign in to comment.