Custom Pixhawk Parameter for collision avoidance


Is there anyway that i can create a custom parameter for pixhawk or is there a guide online?
can i use a single sonar sensor to implement collision avoidance using pixhawk itself without companion computer or arduino board?
i using pixhawk mini APM 3.6.6 and mission planner.

Please help thanks