Array not working as intended?

When you define char val = "o"; it creates an array with a single element. And I believe it should be 'o' with single quotes.

You need an array with 2 elements if you need to receive 2 characters char val[2] = {'o', 'o'};

The when serial.available >= 2 you need to do serial.read() twice once to put the first char in val[0] and once to put the second char in val[1].

Then your tests for what is in val[] will also need to be changed.

Unfortunately Serial.flush() does not do what a normal person would think it should do, and you don't need it.

...R