This is an example of how to program a sprite to interact with the ultra-sonic distance sensor.
You will need a Lego Wedo kit to use this program.