C# Class Raspberry.IO.Components.Displays.Ssd1306.Ssd1306Connection

Represents a connection with an Ssd1306 I2C OLED display.
Mostrar archivo Open project: raspberry-sharp/raspberry-sharp-io Class Usage Examples

Public Methods

Method Description
ActivateScroll ( ) : void

Activates the scroll.

ClearScreen ( ) : void

Clears the screen.

DeactivateScroll ( ) : void

Deactivates the scroll.

DrawImage ( byte image ) : void

Draws the image.

DrawText ( IFont font, string text ) : void

Draws the text.

GotoXY ( int column, int row ) : void

Sets the current cursor position to the specified column and row.

InvertDisplay ( ) : void

Inverts the display.

NormalDisplay ( ) : void

Sets the display to normal mode.

Off ( ) : void

Turns the display off.

On ( ) : void

Turns the display on.

SetContrast ( int contrast ) : void

Sets the contrast (brightness) of the display. Default is 127.

SetScrollProperties ( ScrollDirection direction, ScrollSpeed scrollSpeed, int startLine, int endLine ) : void

Sets the scroll properties.

Ssd1306Connection ( Raspberry.IO.InterIntegratedCircuit.I2cDeviceConnection connection, int displayWidth = 128, int displayHeight = 64 ) : System

Initializes a new instance of the Ssd1306Connection class.

Private Methods

Method Description
DrawStride ( byte data ) : void
Initialize ( ) : void
SendCommand ( ) : void

Method Details

ActivateScroll() public method

Activates the scroll.
public ActivateScroll ( ) : void
return void

ClearScreen() public method

Clears the screen.
public ClearScreen ( ) : void
return void

DeactivateScroll() public method

Deactivates the scroll.
public DeactivateScroll ( ) : void
return void

DrawImage() public method

Draws the image.
public DrawImage ( byte image ) : void
image byte Image.
return void

DrawText() public method

Draws the text.
public DrawText ( IFont font, string text ) : void
font IFont Font.
text string Text.
return void

GotoXY() public method

Sets the current cursor position to the specified column and row.
public GotoXY ( int column, int row ) : void
column int Column.
row int Row.
return void

InvertDisplay() public method

Inverts the display.
public InvertDisplay ( ) : void
return void

NormalDisplay() public method

Sets the display to normal mode.
public NormalDisplay ( ) : void
return void

Off() public method

Turns the display off.
public Off ( ) : void
return void

On() public method

Turns the display on.
public On ( ) : void
return void

SetContrast() public method

Sets the contrast (brightness) of the display. Default is 127.
public SetContrast ( int contrast ) : void
contrast int A number between 0 and 255. Contrast increases as the value increases.
return void

SetScrollProperties() public method

Sets the scroll properties.
public SetScrollProperties ( ScrollDirection direction, ScrollSpeed scrollSpeed, int startLine, int endLine ) : void
direction ScrollDirection Direction.
scrollSpeed ScrollSpeed Scroll speed.
startLine int Start line.
endLine int End line.
return void

Ssd1306Connection() public method

Initializes a new instance of the Ssd1306Connection class.
public Ssd1306Connection ( Raspberry.IO.InterIntegratedCircuit.I2cDeviceConnection connection, int displayWidth = 128, int displayHeight = 64 ) : System
connection Raspberry.IO.InterIntegratedCircuit.I2cDeviceConnection The connection.
displayWidth int The display displayWidth.
displayHeight int The display displayHeight.
return System