Seen on hackaday - here translated to English:
http://translate.google.com/translate?s ... 2F&act=url
Uses Timers TIM2,3,8 to make a phase difference calculator and thereby discovers distance.
Would be cool to implement the Python version - but needs external hardware board to do mixing and LPF.