STK31862.Measurement (stk31862 v0.1.0)

Copy Markdown View Source

One sensor measurement report.

  • light_lux - the ALS channel converted to lux
  • als_raw - the raw 16-bit ALS (human-eye response) channel count
  • c_raw - the raw 16-bit C (clear/unfiltered) channel count
  • saturated? - true when the ALS channel saturated; light_lux is then invalid and the gain or integration time should be reduced
  • timestamp_ms - System.monotonic_time(:millisecond) when read

Summary

Types

t()

@type t() :: %STK31862.Measurement{
  als_raw: 0..65535,
  c_raw: 0..65535,
  light_lux: float(),
  saturated?: boolean(),
  timestamp_ms: integer()
}

Functions

new(als_raw, c_raw, als_lux_per_count, saturated?)

@spec new(0..65535, 0..65535, number(), boolean()) :: t()