Interface CC3D flight controller with Arduino and connect Sr04 sensors

i am having problems with Interfacing CC3D flight controller with Arduino and connecting Sr04 sensors.
Can anyone help me with the software part of this issue?
i have attached the developed code, but can't figure out the issue.

Thanks

version_2.1.ino (5.37 KB)