1

I just got my arduino and servo. But my servo may be acting strangely.

Whenever I tell the servo to go somewhere it keeps going to 0 than to that position and stops after 10-15 seconds or more.

This is the code used in this video

#include <Servo.h> 

    Servo myservo;

    void setup() 
    { 
      myservo.attach(11);
      myservo.write(50);
    } 

    void loop() 
    { 
    }     

https://www.youtube.com/watch?v=rsikknT7z6g

It is connected like this:

Ground from Arduino to breadboard row 3

Ground from external power supply to breadboard row 3

Ground from SERVO to breadboard row 3

Power supply positive to servo VCC

Servo signal to pin 11

  • 1
    how is this being powered? – BrettAM Dec 24 '14 at 22:26
1

Try with something like:

#include <Servo.h> 

    Servo myservo;

    void setup() 
    { 
      myservo.attach(11);

    } 

    void loop() 
    { 
        delay(2000);
        myservo.write(50);
        while(1);
    }  

and let us know. But more important: disconnect the servo +5V wire from Arduino and use another power supplier!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.