hts221

package
v0.0.0-...-5725b45 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

Package hts221 provides access to HTS221 devices.

Index

Constants

View Source
const (
	SlaveAddr = 0x5f // I2C slave address
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

Device is a handle to a HTS221 device.

func Open

func Open(conn *smbus.Conn, addr uint8) (*Device, error)

Open opens a connection to a HTS221 device at the given address.

func (*Device) Sample

func (dev *Device) Sample() (h, t float64, err error)

Sample return the humidity and temperature as measured by the device.

Jump to

Keyboard shortcuts

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