adc0832

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ADC0832

type ADC0832 struct {
	spi.SPI
	// contains filtered or unexported fields
}

ADC0832 reads ADC values from a connected ADC0832.

The two data pins, di and do, may be tied and connected to a single GPIO pin.

func New

func New(tclk, tset time.Duration, clk, csz, di, do int) *ADC0832

New creates a ADC0832.

func (*ADC0832) Read

func (adc *ADC0832) Read(ch int) uint8

Read returns the value of a single channel read from the ADC.

func (*ADC0832) ReadDifferential

func (adc *ADC0832) ReadDifferential(ch int) uint8

ReadDifferential returns the value of a differential pair read from the ADC.

Jump to

Keyboard shortcuts

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