By Daniel Brooke Peig (www.danbp.org)
This code snippet reads data from the serial port (user inputs) and parses the formatted data so it can be used by other functions. You can consider this a mini shell for the Arduino serial terminal.
Example: Set variable 2 (id=2) equal to 12.3
> setvar 2 12.3