UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

MB704X Class

Module: mb704x

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.

Item Index

Methods

Methods

MB704X

(
  • bus
  • addr
)
Number

Initialize a device context.

Parameters:

  • bus Number

    Specify which the I2C bus to use. The default is 0.

  • addr Number

    Specify the I2C address to use. The default is 112.

Returns:

Number:

getRange

() Number

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

Returns:

Number:

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