The program below is what i wrote to control the servo movement under the user code. However with myservo.attach(A7) i could not armed the quad copter. Can anyone help me out? is there other method in controlling the servo???
I am using the APM2 board.
#include <Servo.h>
Servo myservo;
void userhook_init()
{
myservo.attach(A7);
myservo.write(0); // set servo to start
}
void userhook_50Hz()
{
myservo.write(180);
}
Replies
Check this out, works on 2.9 (not 2.81)
http://code.google.com/p/arducopter/wiki/AC2_Camera
i am using it for parachute deployment in case there is a power failure.