     //Serial.println(inputCommand);
     //Serial.println(inputValue);
 
-    switch (var) {
+    switch (res) {
       case 0:
         // No Error
         break;

  Forked frin Serial Event example

  http://www.arduino.cc/en/Tutorial/SerialEvent

 */


        break;
      default:
        // statements
        Serial.print("!3 "+ inputString);
    }

    // clear the string:
