LcdRgb Class

Definition

Supports I2c LCDs with I2c RGB backlight, such as the Grove - LCD RGB Backlight (i.e. 16x2 LCD character display with RGB backlight).

public class LcdRgb : Iot.Device.CharacterLcd.Hd44780
type LcdRgb = class
    inherit Hd44780
Public Class LcdRgb
Inherits Hd44780
Inheritance
LcdRgb

Remarks

This implementation was drawn from numerous libraries such as Grove_LCD_RGB_Backlight.

Constructors

LcdRgb(Size, I2cDevice, I2cDevice)

Initializes a new HD44780 LCD controller.

LcdRgb(Size, I2cDevice, I2cDevice)

Initializes a new HD44780 LCD controller.

LcdRgb(Size, LcdInterface, I2cDevice)

Initializes a new HD44780 LCD with an RGB Backlight.

LcdRgb(Size, LcdInterface, I2cDevice)

Initializes a new HD44780 LCD with an RGB Backlight.

Fields

_interface (Inherited from Hd44780)
_lcdInterface

LCD interface used by the device

(Inherited from Hd44780)
_rowOffsets

Offsets of the rows

(Inherited from Hd44780)
ClearDisplayCommand

Command which can be used to clear the display

(Inherited from Hd44780)
ReturnHomeCommand

Command which can be used to return (cursor) home

(Inherited from Hd44780)
SetCGRamAddressCommand

Command which can be used to set CG RAM address

(Inherited from Hd44780)
SetDDRamAddressCommand

Command which can be used to set DD RAM address

(Inherited from Hd44780)

Properties

AutoShift

When enabled the display will shift rather than the cursor.

(Inherited from Hd44780)
BacklightOn

Enable/disable the backlight.

BlinkingCursorVisible

Enable/disable the blinking cursor.

(Inherited from Hd44780)
DisplayOn

Enable/disable the display.

(Inherited from Hd44780)
Increment

Gets/sets whether the cursor location increments (true) or decrements (false).

(Inherited from Hd44780)
NumberOfCustomCharactersSupported

Returns the number of custom characters for this display. A custom character is one that can be user-defined and assigned to a slot using CreateCustomCharacter(Int32, ReadOnlySpan<Byte>)

(Inherited from Hd44780)
Size

Logical size, in characters, of the LCD.

(Inherited from Hd44780)
UnderlineCursorVisible

Enable/disable the underline cursor.

(Inherited from Hd44780)

Methods

Clear()

Clears the LCD, returning the cursor to home and unshifting if shifted. Will also set to Increment.

(Inherited from Hd44780)
CreateCustomCharacter(Byte, Byte[]) (Inherited from Hd44780)
CreateCustomCharacter(Byte, ReadOnlySpan<Byte>)

Fill one of the 8 CGRAM locations (character codes 0 - 7) with custom characters.

(Inherited from Hd44780)
CreateCustomCharacter(Int32, Byte[])

Fill one of the 8 CGRAM locations (character codes 0 - 7) with custom characters. See CreateCustomCharacter(Int32, ReadOnlySpan<Byte>) for details.

(Inherited from Hd44780)
CreateCustomCharacter(Int32, ReadOnlySpan<Byte>)

Fill one of the 8 CGRAM locations (character codes 0 - 7) with custom characters.

(Inherited from Hd44780)
Dispose()

Releases unmanaged resources used by Hd44780 and optionally release managed resources

Dispose()

Releases unmanaged resources used by Hd44780 and optionally release managed resources

(Inherited from Hd44780)
Dispose(Boolean)

Releases unmanaged resources used by Hd44780 and optionally release managed resources

Dispose(Boolean)

Releases unmanaged resources used by Hd44780 and optionally release managed resources

(Inherited from Hd44780)
GetTwoLineMode(Int32)

Determines if the device should use two line mode

(Inherited from Hd44780)
Home()

Moves the cursor to the first line and first column, unshifting if shifted.

(Inherited from Hd44780)
InitializeRowOffsets(Int32)

Initializes row offsets

(Inherited from Hd44780)
SendCommand(Byte)

Sends command to the device

(Inherited from Hd44780)
SendCommandAndWait(Byte)

The initialization sequence and some other complex commands should be sent with delays, or the display may behave unexpectedly. It may show random, blinking characters or display text very faintly only.

(Inherited from Hd44780)
SendCommands(ReadOnlySpan<Byte>)

Send commands to the device

(Inherited from Hd44780)
SendData(Byte)

Sends byte to the device

(Inherited from Hd44780)
SendData(ReadOnlySpan<Byte>)

Sends data to the device

(Inherited from Hd44780)
SendData(ReadOnlySpan<Char>)

Sends data to the device

(Inherited from Hd44780)
SetBacklightColor(Color)

Sets the backlight color. The action will be ignored in case of the backlight is disabled.

SetBacklightColor(Color)

Sets the backlight color. The action will be ignored in case of the backlight is disabled.

SetCursorPosition(Int32, Int32)

Moves the cursor to an explicit column and row position.

(Inherited from Hd44780)
ShiftCursorLeft()

Move the cursor left one position.

(Inherited from Hd44780)
ShiftCursorRight()

Move the cursor right one position.

(Inherited from Hd44780)
ShiftDisplayLeft()

Move the display left one position.

(Inherited from Hd44780)
ShiftDisplayRight()

Move the display right one position.

(Inherited from Hd44780)
WaitForNotBusy(Int32)

Wait for the device to not be busy.

(Inherited from Hd44780)
Write(Char[])

Write a raw byte stream to the display. Used if character translation already took place

(Inherited from Hd44780)
Write(ReadOnlySpan<Byte>)

Write a raw byte stream to the display. Used if character translation already took place

(Inherited from Hd44780)
Write(ReadOnlySpan<Char>)

Write a raw byte stream to the display. Used if character translation already took place

(Inherited from Hd44780)
Write(String)

Write text to display.

(Inherited from Hd44780)

Extension Methods

CreateCustomCharacter(ICharacterLcd, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)

Creates a custom character for standard displays with 8-pixel-per-row characters. See CreateCustomCharacter(Int32, ReadOnlySpan<Byte>) for details.

Applies to