sht4x

package
v0.0.0-...-0087ba1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package sht4x provides a driver for the SHT4x digital humidity sensor series by Sensirion. Datasheet: https://www.sensirion.com/media/documents/33FD6951/64D3B030/Sensirion_Datasheet_SHT4x.pdf

Index

Constants

View Source
const DefaultAddress = 0x44

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

Device represents a SHT4x sensor

func New

func New(bus drivers.I2C) Device

New creates a new SHT4x connection. The I2C bus must already be configured.

func (*Device) ReadTemperatureHumidity

func (d *Device) ReadTemperatureHumidity() (temperatureMilliCelsius int32, relativeHumidityMilliPercent int32, err error)

ReadTemperatureHumidity starts a measurement and then reads out the results. This function blocks while the measurement is in progress.

Temperature is returned in [degree Celsius], multiplied by 1000, and relative humidity in [percent relative humidity], multiplied by 1000.

Jump to

Keyboard shortcuts

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