I need help coding our sonar sensor.
No one can answer you with such a badly explained post. What do you want to do and what software are you using to program?
I am using VCS and if an object is less than 8 inches away from the Sonar Sensor then It will make the arm move and flip the cap. If it is more then 8 inches away then it will keep moving.