Parameters to control my TowerPro SG90 servo?

Im trying to control it, but I cant find any specific parameters.
How can I calculate params to do “X degrees CW/CCW” ?
I tried looking for examples but couldnt find anything specific.

I’ve been using the Adafruit analog feedback servo’s and there isn’t much data on those either, however, you probably just need to tweak the duty cycle values for yours.

Here is the code I am using… it is based on a project by @Schwolop. Includes a JQuery web control.

I just found a page that says the Pulse Width is 500-2400us… so I think that means you should set these two values in the code above like so…

g_minDutyCycle <- 0.05 g_maxDutyCycle <- 0.24

Perhaps someone can tell me if I’m completely off here. In any case, if you play with those two values, you can determine the full rotation of the servo.

Well, Thanks.
the max-min approach is a good start.
I’ll play with those values a bit.
maybe someone will suggest better/accurate idea later on :slight_smile:

If those values are correct, the code allows you to specify a value between 0 and 1. ) being full CCW, and 1 being full CW.

Well, after further tests, 0.05 is indeed the top of one edge, but 0.24 is too much, the servo starts to make noises. at 0.18 its OK