So the parser needs to parse commands like, { one_byte }. While the pfod Specification supports sending user input such as text and number to the pfodDevice, in many cases the pfodDevice only needs to respond to simple commands of the form { cmd }, where the cmd specifies which function the user wants executed. Commands can be more than one byte long but using just a..z A..Z 0..9 gives 62 unique commands which is more than enough for most devices so this parser shown below will handle the majority of cases. For a complete pfod message parser see Remote Controlled LCD Display.
The cmd parser code for Arduino is: