I’ve uploaded v0.92 of Pi Droid Alpha’s Python API to the Pi Droid Alpha product page.
v0.92 adds direct support for the extremely popular and inexpensive HC-SR04 ultrasonic range
readDistance2(_trig, _echo) returns the distance to the nearest object in mm
For an explanation of the code, please see my article HC-SR04 distance sensor interfacing with C and Python
The new PDALib is available in the Downloads section of the Pi Droid Alpha product page
PDALib makes Pi Droid Alpha almost 99% compatible with RoboPiLib – the Python API for RoboPi advanced robot controller.