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.

MAX44000 Class

Module: max44000

Maxim Integrated* MAX44000 is an ambient and infrared proximity sensor. This module was tested on the Maxim Integrated MAX44000PMB1 PMOD module from the analog PMOD kit.

Methods

MAX44000

(
  • bus
  • devAddr
)
Number

Instantiates an MAX44000 object

Parameters:

  • bus Number

    Number of the used bus

  • devAddr Number

    Address of the used I2C device

Returns:

Number:

getProximity

() Number

MAX44000 object destructor; basically, it closes the I2C connection. ~MAX44000 (); no need for the destructor - the I2c connection will be closed when m_i2cMaxControlCtx variable will be out of context Reads the proximity value from the sensor (based on ambient data).

Returns:

Number:

getAmbient

() Number

Reads the ambient value from the sensor (based on ambient data).

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: