How / Where do I start with MavLink?

Ok, what I want to do is have the navigation lights and status lights on my quad display different colors and blink patters based on the status of the quad. I am running APM:Copter 3.2 and already have a  telemetry radio, and soon an OSD. What I want to do is add an additional Mavlink 'decoder' to control a set of addressable LEDs to indicate different status messages such as, Armed or not, GPS count, HDOP, maybe some others later, but those at the start. i was thinking on using something similar to the minimOSD boards, but instead of a video interface, it would control some LEDs. I got the LED control code, so that is not my issue. My issue is where do I start on the Mavlink side? the device only needs to listen, it is not going to send any messages, so that should make it a little easier?

So, can someone point me in the right direction so I can find instructions on how to listen to Mavlink messages?

Thanks!!

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

Join diydrones

Email me when people reply –

Replies

  • Rolf Blomgren published an article on how to send telemetry to the taranis. He did this by using a Teensy (Arduino compatible) reading the relevant telemetry data from Mavlink. I was able to read and adapt this code to my own needs and to make the colors of LED's change (I use neopixel LED strips). In Rolfs article you can download the library and code he uses (download MavLink_FrSkySPort_1.3.zip). He also provides the wiring you need to connect your APM to the Teensy. Wonderful piece of work and still an active thread.

    The thing I am missing is how to send a Mavlink command *UP* from an Arduino. If somebody could help me with that ;-)

  • I'm really interested in this subject too.  I already have an arduino nano running a strip of WS8212 LEDs as navigation lights,  and my aim was always to read mode changes and failsafe's from the Mavlink stream to control the LEDs.  I never found an appropriate tutorial that showed how to use the mavlink libraries on an arduino for this kind of thing.

    In case you haven't found them already, the libraries are here: http://qgroundcontrol.org/dev/mavlink_arduino_integration_tutorial

    The description of the Receive function is the best hope we have right now for making this happen.

     

    • Thanks, I'll start reading!!

This reply was deleted.

Activity

David Hori liked Isabella Domi's profile
Wednesday
gotham liked gotham's profile
Dec 3, 2020
More…