I am trying to connect this sensor via navio 2’s UART port (which to my understanding uses GPIO pins 14 and 15 on the pi). I can successfully read the sensor’s data from a python script using pyserial by opening /dev/ttyAMA0, but it does not work in ardupilot (serial 5).
For the navio config, I have:
# Default settings for ArduPilot for Linux.
# The file is sourced by systemd from arducopter.service
TELEM1="-A udp:192.168.1.108:5555"
TELEM5="-F /dev/ttyAMA0"
# Options to pass to ArduPilot
ARDUPILOT_OPTS="$TELEM1 $TELEM5"
Most likely, you need to reconsider the parameters in the Mission Planner configuration. Here is the post with Marc’s settings that should help you out:
Hi, thank you for responding @liudmila.slepova . I have tested the Mission Planner parameters and they work with a different flight controller, but not with the Navio 2. I’ve also talked with the ardupilot devs and they said that the issue is likely that navio is not detecting the UART device. Could you please describe the process of adding a UART device to Navio 2 after connecting Rx and Tx?
For connecting the device to Navio2, you need to configure the necessary parameter in /etc/default/ardu* file and then reload the configuration with sudo systemctl daemon-reload. If the autopilot was running while you were changing the settings, the restart is required for the changes to take the effect.