I don't know how to make the program see what is entered on the keyboard, and take it and make the decisions based on what was entered.
Can anyone help me figure out what code I need to enter into the following code to accomplish this task?
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");
while ((input = Serial.read()) == -1);
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);
}