mpl3115a2 v0.2.0 MPL3115A2.Device

A process which manages the MPL3115A2 peripheral.

Link to this section Summary

Functions

Returns the current altutude (in meters).

Returns the change in altitude since the last sample (in meters).

Execute an arbitrary function with the PID of the I2C connection.

Returns the current barometric pressure (in Pascals).

Returns true of there is pressure data ready for reading.

Returns the change in pressure since the last sample (in Pascals).

Returns true of there is pressure or temperature data ready for reading.

Returns the current temperature (in ℃)

Returns true of there is temperature data ready for reading.

Returns the change in temperature since the last sample (in ℃)

Link to this section Types

Link to this type

altitude()

altitude() :: non_neg_integer()
Link to this type

device_name()

device_name() :: any()
Link to this type

pressure()

pressure() :: non_neg_integer()
Link to this type

temperature()

temperature() :: number()

Link to this section Functions

Link to this function

altitude(pid)

altitude(pid() | device_name()) :: altitude()

Returns the current altutude (in meters).

Link to this function

altitude_delta(pid)

altitude_delta(pid() | device_name()) :: altitude()

Returns the change in altitude since the last sample (in meters).

Link to this function

execute(pid, function)

execute(pid() | device_name(), (pid() -> any())) :: any()

Execute an arbitrary function with the PID of the I2C connection.

Link to this function

pressure(pid)

pressure(pid() | device_name()) :: pressure()

Returns the current barometric pressure (in Pascals).

Link to this function

pressure_data_available?(pid)

pressure_data_available?(pid() | device_name()) :: boolean()

Returns true of there is pressure data ready for reading.

Link to this function

pressure_delta(pid)

pressure_delta(pid() | device_name()) :: pressure()

Returns the change in pressure since the last sample (in Pascals).

Link to this function

pressure_or_temperature_data_ready?(pid)

pressure_or_temperature_data_ready?(pid() | device_name()) :: boolean()

Returns true of there is pressure or temperature data ready for reading.

Link to this function

temperature(pid)

temperature(pid() | device_name()) :: temperature()

Returns the current temperature (in ℃)

Link to this function

temperature_data_available?(pid)

temperature_data_available?(pid() | device_name()) :: boolean()

Returns true of there is temperature data ready for reading.

Link to this function

temperature_delta(pid)

temperature_delta(pid() | device_name()) :: temperature()

Returns the change in temperature since the last sample (in ℃)