pyupm_mb704x module

class pyupm_mb704x.MB704X(bus=0, addr=112)[source]

Bases: object

API for the MB704x MaxSonar-WR Ultrasonic Ranger.

ID: mb704x

Name: I2C MaxSonar WR Ultrasonic Ranger

Other Names: MB7040 MB7047 MB7247

Category: sound

Manufacturer: maxbotix

Connection: i2c

Link:http://www.maxbotix.com/Ultrasonic_Sensors/I2C_Distance_Sensors.htm This driver was tested with the MB704x MaxSonar-WR Ultrasonic Ranger using the long distance, weather resistant horn. Depending on your sensor type and horn, tanges from 20cm to 750cm are possible.

C++ includes: mb704x.hpp

getRange()[source]

int getRange()

Query the device for a range reading. The range will be reported in centimeters (cm).

dev: Device context

Measured range, -1 on error. The range is reported in centimeters (cm).