NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

Without the "volatile" it won't compile, which is why I used it.

Except for the echo pin, you could cast it away.
It isn't necessary for the data direction registers or the trigger pin.