How to wait for a answer from the serial monitor in void loop then continue?

Hi everyone...For the project that I am currently doing it requires a answer from the serial monitor then continue...It has to wait until there is an answer and this has to be done in void loop() please help...

Thank you!

while (!Serial.available());

Hi everyone...For the project that I am currently doing it requires an answer ( in this case 9 ) from the serial monitor then continue...It has to wait until there is an answer and this has to be done in void loop()...If it is correct, the loop continues...please help...

Thank you!

Duplicate topics merged