http://mbed.org/users/prabhuvd/code/HCSR04/#71da0dbf4400