View Source CircuitsSim.Device.SGP30 (circuits_sim v0.1.0)

Sensirion SGP30 gas sensor

Typically found at 0x58 See the datasheet Many features aren't implemented.

Call the following functions to change the state of the sensor.

Summary

Types

@type options() :: [{:serial, integer()}]
@type t() :: %CircuitsSim.Device.SGP30{
  co2_eq_ppm: integer(),
  current: atom(),
  ethanol_raw: integer(),
  h2_raw: integer(),
  serial: integer(),
  tvoc_ppb: integer()
}

Functions

@spec child_spec(keyword()) :: Supervisor.child_spec()
@spec new(options()) :: %CircuitsSim.Device.SGP30{
  co2_eq_ppm: 0,
  current: nil,
  ethanol_raw: 0,
  h2_raw: 0,
  serial: 0,
  tvoc_ppb: 0
}
Link to this function

set_co2_eq_ppm(bus_name, address, value)

View Source
@spec set_co2_eq_ppm(String.t(), Circuits.I2C.address(), integer()) :: :ok
Link to this function

set_ethanol_raw(bus_name, address, value)

View Source
@spec set_ethanol_raw(String.t(), Circuits.I2C.address(), integer()) :: :ok
Link to this function

set_h2_raw(bus_name, address, value)

View Source
@spec set_h2_raw(String.t(), Circuits.I2C.address(), integer()) :: :ok
Link to this function

set_tvoc_ppb(bus_name, address, value)

View Source
@spec set_tvoc_ppb(String.t(), Circuits.I2C.address(), integer()) :: :ok