Skip to main content

Class GpioCharacterDisplay

Represents a GPIO character display

Assembly: CharacterDisplay.dll
View Source
Declaration
public class GpioCharacterDisplay : ICharacterDisplay, ITextDisplay, IDisplay, IDisposable

Implements:
Meadow.Foundation.Displays.Lcd.ICharacterDisplay, Meadow.Peripherals.Displays.ITextDisplay, Meadow.Peripherals.Displays.IDisplay, System.IDisposable

Properties

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

DisplayConfig

The text display menu configuration

View Source
Declaration
public TextDisplayConfig DisplayConfig { get; protected set; }

Methods

WriteLine(string, byte, bool)

Write text to a line

View Source
Declaration
public void WriteLine(string text, byte lineNumber, bool showCursor = false)
Parameters
TypeNameDescription
System.StringtextThe text to display
System.BytelineNumberThe target line
System.BooleanshowCursorIf true, show the cursor

Write(string)

Write a string to the display

View Source
Declaration
public void Write(string text)
Parameters
TypeNameDescription
System.StringtextThe text to show as a string

SetCursorPosition(byte, byte)

Set the cursor position

View Source
Declaration
public void SetCursorPosition(byte column, byte line)
Parameters
TypeNameDescription
System.BytecolumnThe cursor column
System.BytelineThe cursor line

ClearLines()

Clear all lines

View Source
Declaration
public void ClearLines()

ClearLine(byte)

Clear a line of text

View Source
Declaration
public void ClearLine(byte lineNumber)
Parameters
TypeNameDescription
System.BytelineNumberThe line to clear (0 indexed)

SetContrast(float)

Set the display contrast

View Source
Declaration
public void SetContrast(float contrast = 0.5)
Parameters
TypeNameDescription
System.SinglecontrastThe contrast as a float (0-1)
Exceptions

System.ArgumentOutOfRangeException

SaveCustomCharacter(byte[], byte)

Save a custom character to the display

View Source
Declaration
public void SaveCustomCharacter(byte[] characterMap, byte address)
Parameters
TypeNameDescription
System.Byte[]characterMapThe character data
System.ByteaddressThe display character address (0-7)

Show()

Update the display

View Source
Declaration
public void Show()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
Declaration
protected virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements