Documentation ¶
Index ¶
- Constants
- Variables
- func LcdDisplay(lcdtext_show [4]string, PRSPin int, PEPin int, PD4Pin int, PD5Pin int, ...)
- type GPIO4bit
- func (h *GPIO4bit) Active() bool
- func (h *GPIO4bit) Clear()
- func (h *GPIO4bit) Close()
- func (h *GPIO4bit) Display(line int, text string)
- func (h *GPIO4bit) DisplayLines(msg string)
- func (h *GPIO4bit) Open() (err error)
- func (h *GPIO4bit) Reset()
- func (h *GPIO4bit) SetChar(pos byte, def []byte)
- func (h *GPIO4bit) ToggleBacklight()
- type HD44780
- type I2C4bit
- func (h *I2C4bit) Active() bool
- func (h *I2C4bit) Clear()
- func (h *I2C4bit) Close()
- func (h *I2C4bit) Display(line int, text string)
- func (h *I2C4bit) DisplayLines(msg string)
- func (h *I2C4bit) Open() (err error)
- func (h *I2C4bit) Reset()
- func (h *I2C4bit) SetChar(pos byte, def []byte)
- func (h *I2C4bit) ToggleBacklight()
Constants ¶
View Source
const ( // LCD 4x20 Mode Setting defaults Lines int = 4 Width int = 20 // Maximum characters per line )
Variables ¶
View Source
var ( BKPin int = 0 RSPin int = 0 // GOIO 7 --> Raspberry Physical Pin 26 RS Bit/pin EPin int = 0 // GPIO 8 --> Raspberry Physical Pin 24 Enable bit/pin D4Pin int = 0 // GPIO 25 --> Raspberry Physical Pin 22 Data4 bit/pin D5Pin int = 0 // GPIO 24 --> Raspberry Physical Pin 18 Data5 bit/pin D6Pin int = 0 // GPIO 23 --> Raspberry Physical Pin 16 Data6 bit/pin D7Pin int = 0 // GPIO 18 --> Raspberry Physical Pin 12 Data7 bit/pin )
Functions ¶
Types ¶
type GPIO4bit ¶
type GPIO4bit struct { sync.Mutex RSPin int // GOIO 7 --> Raspberry Physical Pin 26 EPin int // GPIO 8 --> Raspberry Physical Pin 24 D4Pin int // GPIO 25 --> Raspberry Physical Pin 22 D5Pin int // GPIO 24 --> Raspberry Physical Pin 18 D6Pin int // GPIO 23 --> Raspberry Physical Pin 16 D7Pin int // GPIO 18 --> Raspberry Physical Pin 12 // max lines Lines int // Memory address for each line LinesAddr []byte // LCD width (number of character in line) Width int // contains filtered or unexported fields }
func NewGPIO4bit ¶
func NewGPIO4bit() (h *GPIO4bit)
NewGPIO4bit create new GPIO4bit structure with some defaults
func (*GPIO4bit) DisplayLines ¶
DisplayLines sends one or more lines separated by \n to lcd
func (*GPIO4bit) ToggleBacklight ¶
func (h *GPIO4bit) ToggleBacklight()
type I2C4bit ¶
type I2C4bit struct { // max lines Lines int // LCD width (number of character in line) Width int // contains filtered or unexported fields }
I2C4bit allow communicate wit HD44780 via I2C in 4bit mode
func NewI2C4bit ¶
NewI2C4bit create new I2C4bit structure with some defaults
func (*I2C4bit) DisplayLines ¶
DisplayLines sends one or more lines separated by \n to lcd
func (*I2C4bit) ToggleBacklight ¶
func (h *I2C4bit) ToggleBacklight()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.