Is it possible to get a message from pixhawk when it reachs a way point?

I will connect a Arduino Mega to Pixhawk using USART, and I want to receive a message everywhere it reaches a assigned way point by the Mission Planner.

Is it possible? If it is possible, how can do it?

Ardupilot can be configured to transmit the Mavlink MISSION_ITEM_REACHED message. Check out MAVLink and Arduino: step by step

I an understanding MAVLINK messages from your articles, so I thank you so much.

If it is possible by the MISSION_ITEM_MESSAGE, is it should be setted in the Mission Planner? If not, where does it set to send this message?

Sorry if I am being extra stupid but I cannot see how to get Ardupilot to send MISSION_ITEM_REACHED from the thread you link. Can you please elaborate?

In step 5 he shows how to read the messages. In the example code he is reading the heartbeat, sys_status, etc. messages. So in the same way you need to add mission_item_reached and handle it accordingly. The message is send periodically so you don’t need to specifically request it.

Thanks for the quick reply. When I posted my question, I had a SITL running which was not sending any MISSION_ITEM_REACHED at all (my question was about getting Ardupilot to send it out, not about reading it). I had tried requesting all data streams from it but nothing happened. However, I have since restarted SITL and now it seems to be behaving itself. I have no idea what was going on initially but things are working fine now so am not complaining :slight_smile: