analog

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package analog defines analog pins, both DAC and ADC.

Index

Constants

This section is empty.

Variables

View Source
var INVALID invalidPin

INVALID implements both ADC and DAC and fails on all access.

Functions

This section is empty.

Types

type ADC

type ADC interface {
	pin.Pin
	// Range returns the maximum supported range [min, max] of the values.
	Range() (int32, int32)
	// Read returns the current pin level.
	Read() int32
}

ADC is an analog-to-digital-conversion input.

type DAC

type DAC interface {
	pin.Pin
	// Range returns the maximum supported range [min, max] of the values.
	Range() (int32, int32)
	// Out sets an analog output value.
	DAC(v int32)
}

DAC is an digital-to-analog-conversion output.

Jump to

Keyboard shortcuts

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