Difficulty- Serial Read/Serial Print

Oh, you wanted to know what you told the program to to?

Well, lets look at this part of the code, which creates the confusion for you:

  if (Serial.available() > 0)  {

v = Serial.read();
   if (v <= 250 && v >=523) {
   Serial.print("Frequency Set to: ");
   Serial.println(v, BYTE);
 }
 else {
   Serial.println("Unknown Entry");
 }
}

In the first two lines you say: If there's data to read, read one character. It will then check if that character is lower than 250 and at the same time higher than 253. As this is a rather unlikely proposition, your program will tell you to get stuffed.

Now assume you fix your compares so that it checks for between 250 (character ü) and 253 (character ý), it still won't like your input. Why? Because you type a "2" (ascii 50) then a "5" (ascii 53) and then a "3" (ascii 51). All three characters aren't in the range 250-253.

Either you change the data you send to you program or you change your program to read an ascii string by collecting all characters to the end of the message, then convert the string to a number (for example with atoi) before doing your test.

This small exercise could come straight out of a textbook about programming. You'd probably find it as "My third program - handling input". I leave it to you to solve that, it's very educative.

Korman