yeah its looks pretty simple, maybe I just need more time to think about it, but from first glance, I can't seem to wrap my mind around what the code should be.
I guess it would be bring the pin high, wait, bring the pin low, record number and convert to distance?