Simple Servo moving problem

hello every body
i’m new to Arduino and i’m trying to move a servo
i just want to move the servo right and left i don’t know what the angles must be
i had read in the support that it must be between 0 and 180
i tried this

#include <Servo.h>
Servo myservo;

void setup(){

void loop(){

but this never moves the servo , i tried making it myservo.write(180); and myservo.write(0); but nothing happens
when i make it myservo.write(200); it moves anti clockwise until it reaches a custom position then it keep moving in the same place as if it is trying to continue but their is something blocking it.

here is the image of the board

any ideas ?

ok after some tried the blue capacitor was the problem when i removed it it worked like a charm thanks guys


its the default position of a servo motor. try some other angle.

The capacitor should definitely help if its between the supply and ground. Since
removing it helped I suspect you had it connected to pin 9 which would defintely
stop the thing working (and overload pin 9)

But powering a servo from the Arduino 5V pin is not a good idea in the first place,
you will overload it and can cause the board to reset at random, and you may
be putting voltages spikes on the logic supply (could be expensive).