How to input NUMBERS through Arduino serial.monitor ???

Hi forum,
we are trying to make a school project with the arduino mega 2560
we want to control a servo from serial.monitor.we want to give a angle(a namber) to servo from keyboard and the servo to go here.
we want to ask if that is possible and the comand hwo we must learn to do it what..

thank you and sorry for my bad english.

Take a look at this

http://arduino.cc/forum/index.php/topic,109575.0.html

Servo test code that might be of interest.

// zoomkat 10-22-11 serial servo test
// type servo position 0 to 180 in serial monitor
// or for writeMicroseconds, use a value like 1500
// for IDE 0022 and later
// Powering a servo from the arduino usually *DOES NOT WORK*.

String readString;
#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

void setup() {
  Serial.begin(9600);
  myservo.writeMicroseconds(1500); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo control 
  Serial.println("servo-test-22-dual-input"); // so I can keep track of what is loaded
}

void loop() {
  while (Serial.available()) {
    char c = Serial.read();  //gets one byte from serial buffer
    readString += c; //makes the string readString
    delay(2);  //slow looping to allow buffer to fill with next character
  }

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string 
    int n = readString.toInt();  //convert readString into a number

    // auto select appropriate value, copied from someone elses code.
    if(n >= 500)
    {
      Serial.print("writing Microseconds: ");
      Serial.println(n);
      myservo.writeMicroseconds(n);
    }
    else
    {   
      Serial.print("writing Angle: ");
      Serial.println(n);
      myservo.write(n);
    }

    readString=""; //empty for next input
  } 
}

Hmm... I cant seem to get it to read "DAH" It reads the "DIT" fine, but even simplifying the password to a single "." does not activate the LED. However when the code is "-" or "--" it works just fine. Any idea?

What are you talking about? You're replying to a 5-year old thread about entering numbers. DIT and DAH are not numbers.

Steve