Documentation ¶
Index ¶
- type CustomCharacter
- type DotSize
- type GobotLCD
- func (lcd *GobotLCD) AutoScrollOff() error
- func (lcd *GobotLCD) AutoScrollOn() error
- func (lcd *GobotLCD) BacklightOff() error
- func (lcd *GobotLCD) BacklightOn() error
- func (lcd *GobotLCD) Clear() error
- func (lcd *GobotLCD) Connection() gobot.Connection
- func (lcd *GobotLCD) CursorOff() error
- func (lcd *GobotLCD) CursorOn() error
- func (lcd *GobotLCD) DisplayOff() error
- func (lcd *GobotLCD) DisplayOn() error
- func (lcd *GobotLCD) Halt() (err error)
- func (lcd *GobotLCD) Home() error
- func (lcd *GobotLCD) Name() string
- func (lcd *GobotLCD) PrintLeftToRight() error
- func (lcd *GobotLCD) PrintRightToLeft() error
- func (lcd *GobotLCD) RegisterCharacter(location byte, charmap *CustomCharacter) error
- func (lcd *GobotLCD) SetCursor(col, row byte) error
- func (lcd *GobotLCD) SetName(name string)
- func (lcd *GobotLCD) ShiftDisplayLeft() error
- func (lcd *GobotLCD) ShiftDisplayRight() error
- func (lcd *GobotLCD) Start() (err error)
- func (lcd *GobotLCD) UnderlineOff() error
- func (lcd *GobotLCD) UnderlineOn() error
- func (lcd *GobotLCD) Write(str []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomCharacter ¶
CustomCharacter holds the bytes and register for custom characters
func NewCharacter ¶
func NewCharacter(charmap [8]byte) *CustomCharacter
NewCharacter creates a new custom character map to display
func (*CustomCharacter) String ¶
func (c *CustomCharacter) String() string
String will return an ASCII value of the register. Use this with Fprintf and pass in your custom character, or call LiquidCrystalLCD.Write and pass in the register value.
cchar := liquidcrystallcd.NewCharacter([8]byte{...}) lcd.RegisterCharacter(0, cchar) lcd.Home() fmt.Fprintf(lcd, "This is a custom character: %v", cchar) // Use Fprintf... lcd.Write([]byte{0}) // ... or call the Write method
type GobotLCD ¶
GobotLCD controls a Liquid Crystal LCD with an I2C connection.
func New ¶
New connects to an LCD with the given I2C connection, the given row and column size, and the given dot size.
func (*GobotLCD) AutoScrollOff ¶
AutoScrollOff 'right justifies' the text so that the cursor moves when printing characters rather than moving the display
func (*GobotLCD) AutoScrollOn ¶
AutoScrollOn 'left justifies' the text so that the display moves when printing characters rather than moving the cursor
func (*GobotLCD) BacklightOff ¶
BacklightOff turns the lcd light off
func (*GobotLCD) BacklightOn ¶
BacklightOn turns the lcd light on
func (*GobotLCD) Clear ¶
Clear wipes all text from the screen and positions the cursor at the top-left
func (*GobotLCD) Connection ¶
func (lcd *GobotLCD) Connection() gobot.Connection
Connection returns the Connection associated with the Driver
func (*GobotLCD) DisplayOff ¶
DisplayOff turns the text display off
func (*GobotLCD) PrintLeftToRight ¶
PrintLeftToRight prints text from left to right. e.g. 'foo' will display as 'foo'
func (*GobotLCD) PrintRightToLeft ¶
PrintRightToLeft prints text from right to left. e.g. 'foo' will display as 'oof'
func (*GobotLCD) RegisterCharacter ¶
func (lcd *GobotLCD) RegisterCharacter(location byte, charmap *CustomCharacter) error
RegisterCharacter registers a custom character to display on the lcd. Any custom characters currently on the lcd will be immediately replaced. location may be a number from 0 - 7.
func (*GobotLCD) ShiftDisplayLeft ¶
ShiftDisplayLeft moves the text on the entire display to the left
func (*GobotLCD) ShiftDisplayRight ¶
ShiftDisplayRight moves the text on the entire display to the right
func (*GobotLCD) UnderlineOff ¶
UnderlineOff turns off the underline cursor
func (*GobotLCD) UnderlineOn ¶
UnderlineOn turns on the underline cursor