sgp30

package
v3.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CO2

type CO2 uint16

CO2 represents the current carbon dioxide value in ppm

func (CO2) String

func (c CO2) String() string

type Dev

type Dev struct {
	// contains filtered or unexported fields
}

Dev is a handle to an initialized SGP30 device.

func NewI2C

func NewI2C(b i2c.Bus, ctx context.Context) (*Dev, error)

NewI2C returns an object that communicates over I2C to SGP30 environmental sensor.

The address must be 0x58.

func (*Dev) AirQuality

func (d *Dev) AirQuality() Env

AirQuality return the value struct for the sensor

type Env

type Env struct {
	CO2  CO2
	TVOC TVOC
}

Env represents measurements from an environmental sensor.

type TVOC

type TVOC uint16

TVOC represents the current total volatile organic compounds value in ppb

func (TVOC) String

func (t TVOC) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL