Another thing is you've got two virtually identical ping functions.
Give one of them parameters for the pins, and lose the other one.
Another thing is you've got two virtually identical ping functions.
Give one of them parameters for the pins, and lose the other one.