Print...

What am I doing wrong, I can't get it to print.
Serial Monitor is set to 9600
The servo is working fine. Just ticking away. I'm sure this is something simple. I've tried Arduino 1.0.1 and 1.0.2
using Leonardo

#include <Servo.h> 
 
Servo myservo;  
int pos = 0;    
 
void setup() 
{ 
  Serial.begin(9600);
  myservo.attach(9);  
} 
 
void loop() 
{ 
  for(pos = 90; pos < 120; pos += 1)  
  {                                  
    Serial.print(pos); 
    myservo.write(pos);              
    delay(500);
  } 
}

That sketch works for me.

Try disconnecting your servo; it may be an electrical problem.

Yep just tried it with mine and works without a servo attached. If it works without the servo, then you have to power the servo from another source. Like 3 or 4 AAs or something.

It prints out the value of pos on one line. I add a

Serial.println("");

so it will print to a new line everytime.

Nothing attached to the arduino, but USB now. Same thing. Serial monitor is blank.
This is supposed to print to the serial monitor correct?
Maybe I'll try on a different computer.

Switched to a different computer and now it works fine.