Hi everybody, I'm new to this community, I'm here to ask you some information about how can I control my quadcopter, with APM 2.6 onboard, with an Arduino Board (Uno or Mega, I have both, I will use one or the other basing on the needs that I will have).
My very first idea was to use arduino to send PWM signal to APM as it was the remote control receiver, but doing this I won't have the possibility to take control of the drone in case I need to, so I tought that it will be better to control APM via MAVlink, but i'm blocked here because I'm not able to find any example of working code for arduino that sends instructions to APM and receives back informations on the state of the UAV.
I know that what I'm asking is very generic, but I need some type of base to start experimenting and working on it.
Thank you,
Leonardo
Replies
am no expert on this but you would need to find/port code or write arduino mavlink code that interfaces with the APM, so like the code that runs on the 3DR radios or OSD would be an example of what you need to run in your Arduino board to control the APM using Mavlink protocol, am simplifying things a bit am sure :)
Thank you for the reply,
after trying and trying and searching and searching I found a code that converted telemetry informations from mavlink to frsky telemetry, and I managed to modify it to receive mavlink informations and send messages to APM, now I'm trying to arm apm via mavlink, but it seems that in a few hours of work I could get it working, if someone is interested in I can share the arduino code and libraries
Hi Leonardo
Were you successful with your code? If so how did you establish serial communication with apm.
HI,
I managed to make it work, I can send all the commands end receive all informations, the only thing is that I have to use the RC_override cmds that disables my radio and I don't like the idea of not having any control in case of error, I'm working on this...
By the way... I uploaded the file of the mavlink part of the code... it's divided in functions with an explanation for every one, you need the GCS_Mavlink library to make it work
mavlink.ino
Leonardo,
Did you finally used an Arduino Board to communicate with APM? in this case, an Arduino Uno? I can't compile the source code :(
Thanks Leonardo.I will take a look into it.
Up please!