Using Ultrasonic Range Finder SRF02 as Motion Detector

Hello! I want to ask about coding on how to combine piezo code with sensor SRF02 code to arduino UNO? I hope you will help me to solve my problems =( thank you for any responds. I appreciate it so much :')