2

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..

codcod4
  • 61
  • 1
  • 8

3 Answers3

0

Have you set the following parameters?

MAV_1_CONFIG = TELEM 2 (MAV_1_CONFIG is often used to map the TELEM 2 port)

MAV_1_MODE = Onboard

SER_TEL2_BAUD = 921600 (921600 or higher recommended for applications like log streaming or FastRTPS)

Reference: https://docs.px4.io/master/en/companion_computer/pixhawk_companion.html#companion-computer-setup

Ryan M
  • 18,333
  • 31
  • 67
  • 74
0

I believe its because you welded a Dupont cable to JST-GH connector, while it may work it also leaves room to electrical incompatibility and increased signal interferences, best bet is to buy a premade Dupont to JST-GH cable.

-2

there is an easy way to connect raspberry pi with cube autopilot. the companion board lychee https://dronee.aero/pages/lychee

user818117
  • 420
  • 1
  • 5
  • 15