C# 클래스 CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial

Provides an API for manipulating a CrystalFontz 632/634 serial LCD display. This API currently *only* works with serial (SPI not yet supported) displays that are 16x2 (16 column, 2 row).
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
Backspace ( ) : void

Moves the cursor back one space and erases the character in that space.

Begin ( ) : void

Begins communication with the display.

Begin ( DisplayType type ) : void

Begins communication with the display.

CarriageReturn ( ) : void

Moves the cursor to the left-most column of the current row.

ClearDisplay ( ) : void

Clear the contents of the display and return the cursor to its home position (upper left corner, or position 0, 0).

CrLf ( ) : void

Carriage return, line feed. This will move the cursor to the left-most column of the next row (same as calling CarriageReturn followed by LineFeed).

CrystalFontz63xSerial ( ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class. This is the default constructor.

CrystalFontz63xSerial ( BaudRates baud ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with the BAUD rate to negotiate with display.

CrystalFontz63xSerial ( IRaspiGpio backlightPin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with a GPIO pin to use to control the backlight.

CrystalFontz63xSerial ( IRaspiGpio backlightPin, BaudRates baud ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with the GPIO pin to control the backlight with and the BAUD rate to negotiate with the display.

CursorHome ( ) : void

Returns the cursor to its home position (upper left corner).

DeleteInPlace ( ) : void

Deletes the character at the current cursor position but does not move the cursor.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial. The Dispose method leaves the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial was occupying.

End ( ) : void

Ends communication with the display.

FormFeed ( ) : void

Clears the display. All data is erased.

LineFeed ( ) : void

Moves the cursor down one row. If scrolling is enabled and the cursor is in the bottom row, the display will scroll up one row and the bottom row will be cleared. If scrolling is NOT enabled, and the cursor is in the bottom row, then it will wrap up to the same character position on the top row.

Print ( String text ) : void

Prints text to the display.

RebootDisplay ( ) : void

Reboot the LCD display. This should only be used to return the display to a usable state, perhaps due to invalid contrast or brightness values or if the display is printing garbage. However, this method is not likely to succeed if the display's controller is in an inoperable or indeterminate state. In such cases, it is best to power-cycle the controller instead.

SetBarGraph ( GraphIndices index, GraphStyle style, UInt16 startCol, UInt16 endCol, UInt16 len, UInt16 row ) : void

Displays/updates a horizontal bar graph.

SetCursorPosition ( UInt16 column, UInt16 row ) : void

Sets the cursor position.

ShowInfoScreen ( ) : void

Displays the LCD controller info screen.

비공개 메소드들

메소드 설명
Dispose ( System.Boolean disposing ) : void

Releases all resource used by the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial object.

SendCommand ( Byte cmd ) : void

Sends the specified command to the display controller.

메소드 상세

Backspace() 공개 메소드

Moves the cursor back one space and erases the character in that space.
public Backspace ( ) : void
리턴 void

Begin() 공개 메소드

Begins communication with the display.
/// This instance has been disposed. /// /// Cannot initialize the backlight control pin because it is configured as an input. ///
public Begin ( ) : void
리턴 void

Begin() 공개 메소드

Begins communication with the display.
/// This instance has been disposed. /// /// Cannot initialize the backlight control pin because it is configured as an input. ///
public Begin ( DisplayType type ) : void
type DisplayType /// The display type ///
리턴 void

CarriageReturn() 공개 메소드

Moves the cursor to the left-most column of the current row.
public CarriageReturn ( ) : void
리턴 void

ClearDisplay() 공개 메소드

Clear the contents of the display and return the cursor to its home position (upper left corner, or position 0, 0).
public ClearDisplay ( ) : void
리턴 void

CrLf() 공개 메소드

Carriage return, line feed. This will move the cursor to the left-most column of the next row (same as calling CarriageReturn followed by LineFeed).
public CrLf ( ) : void
리턴 void

CrystalFontz63xSerial() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class. This is the default constructor.
public CrystalFontz63xSerial ( ) : System
리턴 System

CrystalFontz63xSerial() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with the BAUD rate to negotiate with display.
/// BAUD rate cannot be less than 2400 or greater than 19200. ///
public CrystalFontz63xSerial ( BaudRates baud ) : System
baud BaudRates /// The BAUD rate. ///
리턴 System

CrystalFontz63xSerial() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with a GPIO pin to use to control the backlight.
public CrystalFontz63xSerial ( IRaspiGpio backlightPin ) : System
backlightPin IRaspiGpio /// The GPIO pin to use to control the backlight. ///
리턴 System

CrystalFontz63xSerial() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial class with the GPIO pin to control the backlight with and the BAUD rate to negotiate with the display.
/// BAUD rate cannot be less than 2400 or greater than 19200. ///
public CrystalFontz63xSerial ( IRaspiGpio backlightPin, BaudRates baud ) : System
backlightPin IRaspiGpio /// The GPIO pin to use to control the backlight. ///
baud BaudRates /// The BAUD rate. ///
리턴 System

CursorHome() 공개 메소드

Returns the cursor to its home position (upper left corner).
public CursorHome ( ) : void
리턴 void

DeleteInPlace() 공개 메소드

Deletes the character at the current cursor position but does not move the cursor.
public DeleteInPlace ( ) : void
리턴 void

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial. The Dispose method leaves the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Devices.CrystalFontzSerialLCD.CrystalFontz63xSerial was occupying.
public Dispose ( ) : void
리턴 void

End() 공개 메소드

Ends communication with the display.
public End ( ) : void
리턴 void

FormFeed() 공개 메소드

Clears the display. All data is erased.
public FormFeed ( ) : void
리턴 void

LineFeed() 공개 메소드

Moves the cursor down one row. If scrolling is enabled and the cursor is in the bottom row, the display will scroll up one row and the bottom row will be cleared. If scrolling is NOT enabled, and the cursor is in the bottom row, then it will wrap up to the same character position on the top row.
public LineFeed ( ) : void
리턴 void

Print() 공개 메소드

Prints text to the display.
public Print ( String text ) : void
text String /// The text to print. ///
리턴 void

RebootDisplay() 공개 메소드

Reboot the LCD display. This should only be used to return the display to a usable state, perhaps due to invalid contrast or brightness values or if the display is printing garbage. However, this method is not likely to succeed if the display's controller is in an inoperable or indeterminate state. In such cases, it is best to power-cycle the controller instead.
public RebootDisplay ( ) : void
리턴 void

SetBarGraph() 공개 메소드

Displays/updates a horizontal bar graph.
public SetBarGraph ( GraphIndices index, GraphStyle style, UInt16 startCol, UInt16 endCol, UInt16 len, UInt16 row ) : void
index GraphIndices /// The graph index to use. ///
style GraphStyle /// The graph style to use. ///
startCol System.UInt16 /// The starting column for the graph (0 - 15). ///
endCol System.UInt16 /// The ending column for the graph (0 - 15). ///
len System.UInt16 /// The graph bar length (should be a value between startCol and endCol). ///
row System.UInt16 /// The row to place the bar graph in (0 or 1). ///
리턴 void

SetCursorPosition() 공개 메소드

Sets the cursor position.
public SetCursorPosition ( UInt16 column, UInt16 row ) : void
column System.UInt16 /// The column to put the cursor in (0 - 15). ///
row System.UInt16 /// The row to put the cursor in (0 or 1). ///
리턴 void

ShowInfoScreen() 공개 메소드

Displays the LCD controller info screen.
public ShowInfoScreen ( ) : void
리턴 void