Skip to content
Browse files

rename, static var that might outlast function

  • Loading branch information...
1 parent 3c4c107 commit 52adcd87c364600e926c187d9b4cc8f144cefe49 @kra kra committed Jul 23, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 effects/{foo/foo.ino → serial/serial.ino}
  2. 0 effects/{foo → serial}/test.py
View
13 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"
@@ -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();
View
0 effects/foo/test.py → effects/serial/test.py
File renamed without changes.

0 comments on commit 52adcd8

Please sign in to comment.
Something went wrong with that request. Please try again.