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.

LIDARLITEV3 Class

Module: common

It is a compact, high-performance optical distance measurement sensor from Garmin. [ LIDARLITEV3 Datasheet] http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf

Methods

LIDARLITEV3

(
  • bus
  • devAddr
)
Number

Instantiates an LIDARLITEV3 object

Parameters:

  • bus Number

    Number of the used bus

  • devAddr Number

    Address of the used I2C device: 0x62

Returns:

Number:

getDistance

() Number

LIDARLITEV3 object destructor; basically, it closes the I2C connection.
~LIDARLITEV3 (); no need for the destructor - the I2c connection will be closed when m_i2ControlCtx variable will be out of context Returns distance measurement on success Retruns -1 on failure.

Returns:

Number:

read

(
  • reg
  • monitorBusyFlag
)
Number

Read Perform I2C read from device.

Parameters:

  • reg Number

    register address to read from.

  • monitorBusyFlag Boolean

    if true, the routine will repeatedly read the status register until the busy flag (LSB) is 0.

Returns:

Number:

name

() String

Returns the name of the component

Returns:

String:

i2cReadReg_8

(
  • reg
)
Number

Reads a one-byte register

Parameters:

  • reg Number

    Address of the register

Returns:

Number:

i2cReadReg_16

(
  • reg
)
Number

Reads a two-byte register

Parameters:

  • reg Number

    Address of the register

Returns:

Number:

i2cWriteReg

(
  • reg
  • value
)
Mraa::Result

Writes to a one-byte register

Parameters:

  • reg Number

    Address of the register

  • value Number

    Byte to be written

Returns:

Mraa::Result: