Problem with comparing serial data

Two things.

  1. The code icon is the #, it is next to the quote. Do not use the quote when posting code.

cls is three bytes. How can one byte ever be equal to three bytes?

You need some way of marking the end of an input string, a line feed or carriage return are most common. You keep gathering bytes into the input string and only do the comparison where you have the complete string.