Separate command input by IR or manual from command execution. Whenever a command entry is detected store it in LastCommand and execute the command in loop().
Separate command input by IR or manual from command execution. Whenever a command entry is detected store it in LastCommand and execute the command in loop().