Welcome to the forums.
I think that the problem may be in how the pan/tilt servo was assembled. I probably didn't make it clear enough in the instructions, but ideally the pan servo should be assembled so that 90 degrees corresponds to the head pointing forward. There is a bit of an art to this as the range of motion of each servo can vary somewhat. One useful technique can be to turn the pan servo all the way left and then detach and reattach the metal bracket so that it points roughly 90 degrees to the left. The commands that you can send to the servo are limited to the range 0 to 180 degrees so you need to assemble the pan/tilt head so that the key angles (0, 90, 180 etc) correspond to directions you want.
The following short Arduino sketch may also help you when assembling the pan/tilt head
- Code:
#include <Servo.h>
const int SERVO_PIN = 9; // The signal pin for the servo
const int SERVO_ANGLE = 90; // Set this to the desired angle
Servo gServo;
void setup()
{
gServo.attach( SERVO_PIN );
}
void loop()
{
gServo.write( SERVO_ANGLE );
}
Hope that helps, please let me know if you need more info or if I've misunderstood something.
Regards
AlanStatistics: Posted by Alan — Mon Dec 29, 2014 12:13 pm
]]>