Obstacle Avoidance not working with HC SR04 sonar

Hi All,

I am using HC SR04 sonar for obstacle avoidance from the given link: https://www.google.co.in/url?sa=t&source=web&rct=j&url=https://m.aliexpress.com/item/32812060782.html&ved=2ahUKEwjsjsiI3fXaAhWDi7wKHb3NDoMQFjACegQIAhAB&usg=AOvVaw2TN5OzHdTUsLLWsHaMEB-1&ampcf=1.

I used it by setting RNGFND_TYPE = “2” (Maxbotix I2C) and by setting PRX_TYPE = “4”(Rangefinder), I was able to see the distance on the proximity sensor window. But it is not working as obstacle avoidance. I enable the AVOID_ENABLE parameter also. But still no luck.

Is there any other parameter which i need to change in Mission planner to make it working? Provided I am using only one sensor in the forward direction.

Thanks.