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);

}

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

This reply was deleted.

Activity