Go Down

Topic: Print... (Read 470 times) previous topic - next topic

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

Code: [Select]
#include <Servo.h>

Servo myservo; 
int pos = 0;   

void setup()

void loop()
  for(pos = 90; pos < 120; pos += 1) 


That sketch works for me.

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


Nov 23, 2012, 04:36 am Last Edit: Nov 23, 2012, 04:38 am by codlink Reason: 1
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

Code: [Select]

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.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131