meter

package
Version: v0.0.0-...-e1da140 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measurement

type Measurement struct {
	Temperature float64
	Co2         int
}

Measurement is the result of a Read operation.

type Meter

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

Meter gives access to the CO2 Meter. Make sure to call Open before Read.

func (*Meter) Close

func (m *Meter) Close() error

Close will close the device file.

func (*Meter) Open

func (m *Meter) Open(path string) (err error)

Open will open the device file specified in the path which is usually something like /dev/hidraw2.

func (*Meter) Read

func (m *Meter) Read() (*Measurement, error)

Read will read from the device file until it finds a temperature and co2 measurement. Before it can be used the device file needs to be opened via Open.

Source Files

Jump to

Keyboard shortcuts

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