For those looking for a quick and easy method of creating MAVLink peripherals, I’ve got a working implementation of the pymavlink library working on the RP2040 microcontroller, using Micropython.
As a useful example, I’ve created a script that reads all the ADC values on a RP2040 and sends the values as
NAMED_VALUE_FLOAT MAVLink messages, which can be read (and graphed) by most GCS’s:
The peripheral itself is connected to a flight controller’s telemetry port, with the
SERIALn_PROTOCOL = 2 and
Full details and source code are available on GitHub.
Thanks for sharing, Stephen! Could you outline how you generated the pymavminimal.py with the message subset? I was looking to add a new message (battery_status) and was trying to figure out if you manually edited common.xml and what the mavgen.py command looked like.
Thanks for sharing, Stephen! Could you show me the way how can I get info life battery voltage, altitude or speed from mavlink ? I don’t full understand your code and don’t know how to change it… thanks in advance