pcf8574clcd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: BSD-2-Clause, BSD-2-Clause Imports: 4 Imported by: 0

README

pcf8574clcd

This is a driver for CLCD(Liquid Crystal) witch use PCF8574 I2C interface.

example chipset

Install

go get github.com/suapapa/go_devices/pcf8574clcd

Build Example

$ cd _example
$ GOARCH=arm GOOS=linux go build

reference

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAddr = uint16(0x20)

DefaultAddr is defulat address of pcf8574

Functions

This section is empty.

Types

type Dev

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

Dev is an open handle to the display controller.

func New

func New(i i2c.Bus, addr uint16, row, col byte) (*Dev, error)

New returns a Dev object that communicates over I²C to a pcf8574 display controller.

func (*Dev) AutoScroll

func (d *Dev) AutoScroll(on bool) error

AutoScroll will 'right justrify' of 'left justify' text from cursor

func (*Dev) BackLight

func (d *Dev) BackLight(on bool) error

BackLight sets backlight brightness

func (d *Dev) Blink(on bool) error

Blink turns on/off ther blinking cursor

func (*Dev) Clear

func (d *Dev) Clear() error

Clear clear display and sets cursor position to zero

func (*Dev) CreateChar

func (d *Dev) CreateChar(location byte, charMap []byte) error

CreateChar allows to fill the first 8 CGRAM location with custom characters

func (*Dev) Cursor

func (d *Dev) Cursor(on bool) error

Cursor turns on/off underline cursor

func (*Dev) Display

func (d *Dev) Display(on bool) error

Display turns on/off display (quickly)

func (*Dev) Home

func (d *Dev) Home() error

Home sets cursor position to zero

func (*Dev) Left2Right

func (d *Dev) Left2Right() error

Left2Right flows text left to right

func (*Dev) Right2Left

func (d *Dev) Right2Left() error

Right2Left flows text right to left

func (*Dev) ScrollLeft

func (d *Dev) ScrollLeft() error

ScrollLeft scroll display left

func (*Dev) ScrollRight

func (d *Dev) ScrollRight() error

ScrollRight scroll display right

func (*Dev) SetCursor

func (d *Dev) SetCursor(col, row byte) error

SetCursor sets cursor to given col, row position

func (*Dev) String

func (d *Dev) String() string

func (*Dev) Write

func (d *Dev) Write(str string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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