Can somebody tell me whats wrong with my code?

strong text

what error you got?

I don't know, but when I use the slider the servo motor just gets jiggly and doesn't follow the code.

maybe it's because the motor is getting new instruction TOO FAST? since the Slider.PositionChanged will be fired very frequently (not only one time, but many times) if you pressed and moved your finger.

I added a delay but it still doesn't work properly. It doesn't move in 0-180 deg. position. It just literally jiggles in a 3 deg. angle

Slider.MinValue & Slider.MaxValue ?

Thanks