Waypoint conditions

Hi sir, we are currently doing a project study about agricultural drone. What we want to happen is that whenever the drone is moving to the next way point it will first check the sensors of our sprayer before proceeding. By the way the code in our sensor was in arduino so we are thinking of connecting the pixhawk to arduino. But we don’t know which part should we insert our code for our sensor.

Hoping for your quick responses sir, THANK YOU.

Add mavlink, and switch to brake mode if required