How can I connecti Raspberry pi 4 to pixhawk?

Viewed 7245

I want to create a connection between pixhawk and raspberry pi 4 model B.

When I connect the Pixhawk to the usb port of raspberry via micro-usb, I can send commands to the pixhawk with the drone-kit scripts on raspberry.

enter image description here

enter image description here

However, when I connect the telemtry2 port to raspberry's 14th and 15th GPIO pins (rx-tx) in pixhawks, the same script gives a heartbeat error.

enter image description here

enter image description here

I have done the configuration of uart pins with rasp-config. The /boot/config.txt file is as follows. Also, when connecting from usb, I use the connection string value "/ dev / ttyACM0" and "/ dev / serial0" when the UART pins are connected.

enter image description here

Via mission planner: SERIAL 2 PROTOCOL = 2 , SERIAL2 BAUD = 921

I followed this link: https://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html

Since there is no GPS installed, I set the GPS and compass control values ​​to 0 on the mission planner. That's why the pixhawk is in arm state. (blue light)

Thank you..

2 Answers
Related