hx711

package
v0.0.0-...-62e5a7b Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: GPL-3.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStopped  = errors.New("hx711 is not powered on")
	ErrNotReady = errors.New("data is not ready for reading")
	ErrBadRead  = errors.New("got unstable reading from device")
)
View Source
var (
	ErrGainUnavailable = errors.New("specified gain value is unavailable")
)

Functions

This section is empty.

Types

type Gain

type Gain int
const (
	ChannelA128 Gain = 1
	ChannelA64  Gain = 3
	ChannelB32  Gain = 2
)

type V2

type V2 interface {
	measurement.StreamingSensor
	SetGain(ctx context.Context, gain Gain) error
}

func New

func New(clk gpio.PinOut, data gpio.PinIn) (V2, error)

New creates a new HX711 device.

The data pin must support edge detection. If your pin doesn't natively support edge detection you can use PollEdge from gpioutil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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