When printing to the serial monitor how do I make what is supposed to be printed, only happen once until the next time;
example I am doing some functional tests on the components, and I write to the serial monitor the instructions of which test to perform, but when I run the program and open the serial monitor the text continues to print, and not stop so the reader can read it and make the decision.
So when the following program executes, it just continues to print on the serial monitor all of the test information in a loop with no stop.
How do I make it print once and wait for the input?
void loop ()
{
Serial.println ("Press the number of the test that you would like to perform...");
Serial.println ("01 = redLed, 02 = greenLed, 03 = yellowLed, 04 = speaker, 05 = leftPhotoCell");
Serial.println ("06 = rightPhotoCell, 07 = leftIRLed/Detector, 08 = rightIRLed/Detector,");
Serial.println ("09 = pushButton, 10 = leftServo, 11 = rightServo");
Serial.println ("Make your selection");
if (Serial.read() == 01)
{
Serial.println ("Testing redLed, the redLed will flash 4 times at 2 Hz");
delay(2000);
digitalWrite (redLed, HIGH);
delay(250);
digitalWrite (redLed, LOW);
delay(250);
Serial.println ("Test Complete");
delay(2000);
}