I am new to Arduino and i have recently tried to write a code to read from the serial port. I wrote a code to prompt the user to input data for the number of Red Led Blinks and the number of yellow Led Blinks inside the void loop. However, when I run my code I am able to input data for the red Led and quickly changes back to red led prompt again overlapping the prompt for the Amber
Serial.println("How Many Times Do You Want The Red Led To Be On? ");
while(Serial.available()==0){}
NumOfRedBlink= Serial.parseInt();
Serial.println("How Many Times Do You Want The Yellow Led To Be On? ");
while(Serial.available()==0){}
NumOfYellowBlink= Serial.parseInt();