Documentation
¶
Index ¶
Constants ¶
View Source
const (
DriverHD44780 = "hd44780"
)
Variables ¶
View Source
var ( ErrDisplayUnsupported = errors.New("display type unsupported") ErrDisplayDisabled = errors.New("display disabled") )
Functions ¶
This section is empty.
Types ¶
type HD44780 ¶
type HD44780 struct { LCDChannel chan LCDMessage // contains filtered or unexported fields }
func NewHD44780 ¶
func NewHD44780(lcdChannel chan LCDMessage, i2cAddress string, i2cBus int) (*HD44780, error)
NewHD44780 Create a new HD44780 struct.
func (*HD44780) DisplayMessage ¶
func (lcd *HD44780) DisplayMessage(message LCDMessage)
DisplayMessage displays the message on the LCD. Pairs of messages will be displayed for the duration set in LCDMessage.
func (HD44780) GetLcdChannel ¶
func (lcd HD44780) GetLcdChannel() chan<- LCDMessage
func (*HD44780) ListenForMessages ¶
ListenForMessages Listen for incoming message requests and display the message received.
type LCD ¶
type LCD interface { DisplayMessage(message LCDMessage) ListenForMessages(ctx context.Context) Cleanup() Clear() GetLcdChannel() chan<- LCDMessage }
LCD is an abstraction layer for concrete implementation of a display.
type LCDMessage ¶
LCDMessage Object representing the message that will be displayed on the LCD. Each array element in Messages represents a line being displayed on the 16x2 screen.
func NewMessage ¶
func NewMessage(duration time.Duration, messages []string) LCDMessage
NewMessage creates a new message for the LCD.
Click to show internal directories.
Click to hide internal directories.