Fly the Arducopter APM 2.6 autonomously

I am new to this discussion forum so please bear with me. I have a arducopter apm 2.6 flight controller. It works fine with mission planner and the fly sky RC kit. I am trying to automate the drone so it could fly without any user control. For now I am trying to achieve a basic hover for couple seconds above the ground at a fixed height and then land back. To get this done, I read the output of the receiver module of the fly sky RC kit on a oscilloscope. After noting the readings required for arming and throttle usage, I wrote a sample sketch in arduino using the servo libraries writeMicroseconds() function. I connected the arduino to the INPUT pins of the flight controller hoping the board would now read signal inputs from the arduino. But it did no seem to work at all. Did I miss something? Is this the correct way to achieve autonomous flight for the arducopter apm 2.6 flight controller board? Is there any other way to do it?

Hmm…
You would need 3 instances from your servo library. One for the mode, another one for the throttle, a third one for the rudder. {That is an absolute minimum} - Not sure apm will like no elevator and no aileron.
I didn’t try {yet} so I just follow what is logical.
I know this should work on pixhawk/pixraptor and the like but apm is really far behind as far as software is concerned.

Step one: mode auto
Step two: throttle to zero rudder full right {This should arm}
Step three rudder back to center
Step four 50 % throttle and your stored mission should execute…
In your case Auto take off then land.

I find this interesting, if I find the time I’ll do it on a pixhawk.

Good luck… :slight_smile:
Henri

I am a bit confused about the mode you mentioned. Is it something I will need to set from the Mission Planner. As for the rest steps, I have done it as per you mentioned. When I attempt to arm with the remote it works fine, but if I follow the same sequence to arm it via the arduino there isn’t a response

To whom it may concern, I solved my problem. It was the flight mode. The Arducopter must have an input at channel 5 at all times in order to achieve any kind motor spin