devices

package
v0.0.0-...-83ae097 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccuracyUltraLow  BMP180Accuracy = 0
	AccuracyLow                      = 0
	AccuracyStandard                 = 1
	AccuracyHigh                     = 2
	AccuracyUltraHigh                = 3
	AccuracyHighest                  = 4
)
View Source
const (
	LinuxW1BusPath = "/sys/bus/w1/devices/w1_bus_master%d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BMP180

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

func CreateBMP180

func CreateBMP180(i2c *i2c.Device) *BMP180

func (*BMP180) Init

func (b *BMP180) Init() (err error)

func (*BMP180) IsBusy

func (b *BMP180) IsBusy() (bool, error)

func (*BMP180) IsValidCalibrationData

func (b *BMP180) IsValidCalibrationData() bool

func (*BMP180) Read

func (b *BMP180) Read() (p unit.Pressure, t unit.Temperature, err error)

type BMP180Accuracy

type BMP180Accuracy = byte

type DS18B20OneWire

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

func (*DS18B20OneWire) Init

func (d *DS18B20OneWire) Init(busNo int, deviceAddr string) (err error)

func (*DS18B20OneWire) ReadNanoK

func (d *DS18B20OneWire) ReadNanoK() (temp unit.Temperature, err error)

type HD44780

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

func CreateHD44780

func CreateHD44780(i2c *i2c.Device, size TextDisplaySize) *HD44780

func (*HD44780) Backlight

func (h *HD44780) Backlight(l bool) error
func (h *HD44780) Blink(bool) error

func (*HD44780) Clear

func (h *HD44780) Clear() error

func (*HD44780) Cols

func (h *HD44780) Cols() byte

func (*HD44780) Command

func (h *HD44780) Command(cmd byte) error

func (*HD44780) Cursor

func (h *HD44780) Cursor(bool) error

func (*HD44780) Display

func (h *HD44780) Display(bool) error

func (*HD44780) Home

func (h *HD44780) Home() error

func (*HD44780) Init

func (h *HD44780) Init() (err error)

func (*HD44780) Pos

func (h *HD44780) Pos() (byte, byte)

func (*HD44780) Print

func (h *HD44780) Print(line string) (err error)

func (*HD44780) Printf

func (h *HD44780) Printf(x string, y ...interface{}) error

func (*HD44780) Rows

func (h *HD44780) Rows() byte

func (*HD44780) SetPos

func (h *HD44780) SetPos(r byte, c byte) (err error)

func (*HD44780) SetPrintFlags

func (h *HD44780) SetPrintFlags(flg byte)

func (*HD44780) Write

func (h *HD44780) Write(buf []byte) (int, error)

type PrintFlags

type PrintFlags byte
const (
	Continuous PrintFlags = 0x1
	Default    PrintFlags = Continuous
)

type ShowOptions

type ShowOptions int

type TextDisplay

type TextDisplay interface {
	Init() error
	Rows() byte
	Cols() byte
	Clear() error
	SetPos(byte, byte) error
	Home() error
	Pos() (byte, byte)
	SetPrintFlags(byte)
	Print(string) error
	Printf(string, ...interface{}) error
	Backlight(bool) error
	Cursor(bool) error
	Blink(bool) error
	Display(bool) error
}

type TextDisplaySize

type TextDisplaySize byte
const (
	SizeUndefined TextDisplaySize = iota
	TextLCD16x2
	TextLCD20x4
)

Jump to

Keyboard shortcuts

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