Mission override on Pixhawk4-PX4 using Arduino

174 views
Skip to first unread message

Shibbir Ahmed

unread,
Sep 14, 2020, 5:34:14 AM9/14/20
to MAVLink
Hi,
I'm new with MAVLink communication. So the situation is  i am trying another person's code from a forum for test.
https://discuss.ardupilot.org/t/arduino-uno-mavlink-px4-no-apparent-connection-problem-understanding-the-code-from-step-by-step-guide/43065
The problem is the person who posted that problem on the forum solved with his Pixhawk cube , and his frame was a plane. I am trying to apply that on Pixhawk 4 with a quadrotor frame. But I am facing the same problem as the person posted. Not responding. My assumption is maybe I am making mistake in system ID and Component ID. I am using PX4 autopilot and an Arduino. Which System ID and Component ID i should use for communication?  Which MAV_CONFIG i need to select for telemetry 2 port, 1 or 2? And which ardiono pins will be better for communication, default RXTX or declared RXTX digital pin?
Thanks

Hamish Willee

unread,
Sep 15, 2020, 2:02:10 AM9/15/20
to MAVLink
Hi
Given that you're talking about the specifics of PX4 MAVLink integration, I suggest you re-post this request on https://discuss.px4.io/


> Which MAV_CONFIG i need to select for telemetry 2 port, 1 or 2?   

MAV_1_CONFIG. You can use whatever unused configuration you like. The reason you use 1 rather than 0 is that 0 is already used by default for TELEM1: http://docs.px4.io/master/en/peripherals/mavlink_peripherals.html#default_ports


> Which System ID and Component ID i should use for communication?

- Your companion computer and flight controller should share the same system ID. NOrmally you'll assign "1", but it depends on how many vehicles you have in the network. 
- The flight controller will have the component id of MAV_COMP_ID_AUTOPILOT1, and the companion should use https://mavlink.io/en/messages/common.html#MAV_COMP_ID_ONBOARD_COMPUTER
- And which ardiono pins will be better for communication, default RXTX or declared RXTX digital pin?  No idea, never used arduino.
Reply all
Reply to author
Forward
0 new messages