Two Serial.read() needed

I am fairly new to the Arduino platform and I wanted to receive one letter per player into different arrays. For example, player one enters "a" and ideally, the system waits for player two. After input of player two, the serial monitor displays moves: Player 1 moves to a, player 2 moves to e. This is not what is happening, after input of first character, the serial monitor skips to end of loop and waits for player 1 input.

    if (Serial.available() > 0){
    char play1 = Serial.read();
    Serial.print("play1: ");
    Serial.println(play1);
    }
    if (Serial.available() > 0){
    char play2 = Serial.read();
    Serial.print("play2: ");
    Serial.println(play2);
    }

Here is the output:

play1: a
play2: 

play1: b
play2:

any suggestions or is this even possible to receive multiple read statements?

This is not what is happening, after input of first character, the serial monitor skips to end of loop and waits for player 1 input.

But, it’s what you told it to do. Serial.available() checks whether there is data to read. It doesn’t wait for data to be available or somehow make data available.

If you want to wait for serial data, you have to wait:

while(Serial.available() < 1)
{
  // Not a darn thing.
}

How are you sending the data? With a carriage return?

This definitely does not work for me:

if (Serial.available() < 1){
    char play2 = Serial.read();

I am using no line ending, but when I do this with carriage return, no line ending or any off them, I get this “play2: ÿ” in an endless loop.

without that bit of code and going back to my original code, if I enter multiple letters, it will format correctly, but that is defeating the purpose.
one letter at a time:
play1: a
play2: ÿ
play1: b
play2: ÿ

multiple letters at a time:

play2: ÿ
play1: b
play2: ÿ
play1: c
play2: ÿ
play1: d
play2: e
play1: f
play2: g
play1: h
play2: i

This definitely does not work for me:
Code:

if (Serial.available() < 1){

How many numbers that “Serial.available” is likely to return, are less than one?

Post your code.

If you want your code to wait for a character to be received, you can do that by waiting until Serial.available() returns a positive value.

If you're expecting several inputs in sequence, it would be sensible to print prompts to indicate what you're waiting for, and ensure that previous input has been consumed before you ask for more input, otherwise you could get into trouble if anyone enters more characters than you are expecting.

char getInput(char *prompt)
{
  // discard any previous input that hasn't already been read
  while(Serial.available() > 0)
  {
      char discard = Serial.read();
  }

  // tell the user what to do
  Serial.println(prompt);

  // wait for the user to provide input
  while(Serial.available() == 0)
  {
    // do nothing
  }

  // return the first character input
  return Serial.read(); 
}

For example, player one enters "a" and ideally, the system waits for player two. After input of player two, the serial monitor displays moves: Player 1 moves to a, player 2 moves to e.

How does the arduino know the input was from player 1 or player 2?

PaulS:

while(Serial.available() < 1)

{
 // Not a darn thing.
}

nathanc:

if (Serial.available() < 1){

char play2 = Serial.read();

Note the glaring and extremely important difference between what PaulS suggested and what you actually did there.