separated hcsr04 code for ctrl-app