Just to test the Pan & Tilt mechanism i created a very small sketch for the Arduino:
Code: Select all
#include <ServoTimer1.h>
ServoTimer1 servo1;
ServoTimer1 servo2;
byte ang1 = 0;
byte ang2 = 90;
byte d1 = 1;
byte d2 = 1;
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Servo test!");
servo1.attach(10);
servo2.attach(9);
}
void loop() {
Serial.print("tick");
servo1.write(ang1);
servo2.write(ang2);
ang1 += d1;
ang2 += d2;
if ((ang1 >= 180)||(ang1 <=0))
{
d1 = -d1;
};
if ((ang2 >= 180)||(ang2 <= 90))
{
d2 = -d2;
};
delay(50);
}
These servo's are well capable of moving a camera around, but don't try to attach a solar panel to this [:D]
<hr noshade size="1"><font size="1">Robert
http://www.hekkers.net <i>Digit's Online Home.</i></font id="size1">