face tracking with servos

Hi,

For tilt (horizontal)
Full Range is between 0 and 2400
When you raise (up) the value it moves counter-clockwise
mid point for 1800 (looks direct ahead)
useable range is 1400 (45 degrees to the left) to 2200 (45 degrees to the right)

For pan (vertical)
Full Range is between 800 (looks directly to the ceiling) and 2400 (looks down)
when u raise (up) the value it moves down
mid point for 1500 (looks direct ahead)
usable range is 1100 to 1900 (90-100 difference in degree i think)

while(True):
    for i in range(800):
        s1.pulse_width(1400 + i)
        time.sleep(5)
    for i in range(800):
        s2.pulse_width(1100 + i)
        time.sleep(5)
    for i in range(800):
        s1.pulse_width(2200 - i)
        time.sleep(5)
    for i in range(800):
        s2.pulse_width(1900 - i)
        time.sleep(5)

also lower time.sleep() works better for my servos