Documentation ¶
Index ¶
- Constants
- type Device
- func (l *Device) Clear()
- func (l *Device) Close()
- func (l *Device) CursorBlink(on bool)
- func (l *Device) CursorOn(on bool)
- func (l *Device) Home()
- func (l *Device) LedOn(on bool)
- func (l *Device) MoveLeft(steps uint8)
- func (l *Device) Print(text string)
- func (l *Device) PrintAt(row, col uint8, text string)
- func (l *Device) PrintByte(ch byte)
- func (l *Device) PrintRune(ch rune)
- func (l *Device) SetCursor(row, col uint8)
- func (l *Device) TurnOn(on bool)
Constants ¶
View Source
const ( BITMODE4 uint8 = iota BITMODE8 )
BITMODE4 and BITMODE8; used to denote if the LCD display is used in 4 or 8 bit mode respectively
View Source
const ( DOTS5x8 uint8 = iota DOTS5x11 )
DOTS5x8 and DOTS5x11; used to specifify the dot matrix used by the LCD display
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device is the basic struct representing the LCD display. Use func New to get a new struct
func New ¶
func New(nrOfRows, nrOfCols uint8, charSym uint8, mode uint8, pinRS, pinE, pinL rpio.Pin, pins ...rpio.Pin) (*Device, error)
New returns a Device struct used as a handler for the LCD display. Arguments are
nrOfRows: (uint8) 1 or 2 rows LCD displayes are supported nrOfCols: (uint8) Nr of columns in the display. 16 and 20 are common values charSym: Symmetry of the characters on the LCD display. DOTS5x8 or DOTS5x11 are supported mode: In which "mode" the display is connected (w/ 4 or 8 data wires). BITMODE4 and BITMODE8 are supported pinRS: GPIO pin used for the RS (reset) pin on the LCD display pinE: GPIO pin used for the E (enable) pin on the LCD display pinL: GPIO pin used for the L (LED) pin on the LCD display pins: GPIO pins used for data, can be either 4 or 8 pins. Start with the lowest numbered pin on the LCD display (D0 or D4, depending on "mode" used)
func (*Device) CursorBlink ¶
CursorBlink sets the cursor to blink/not blink
func (*Device) Home ¶
func (l *Device) Home()
Home moves the cursor to the home position, i.e. row 0, col 0
func (*Device) Print ¶
Print prints the provided text on the LCD display at the current position of the caret
Click to show internal directories.
Click to hide internal directories.