Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.mikroBUS.Displays.C16x9
Characteristic Locus
Inheritance System.Object > C16x9
Namespace Meadow.Foundation.mikroBUS.Displays
Assembly C16x9.dll

Syntax

public class C16x9 : IGraphicsDisplay

Constructors

C16x9(IDigitalOutputPort, II2cBus, Byte)

Creates a CharlieWing driver

Declaration
public C16x9(IDigitalOutputPort onOffPort, II2cBus i2cBus, byte address = null)

Parameters

Type Name Description
IDigitalOutputPort onOffPort

On/Off port

II2cBus i2cBus

I2C bus

System.Byte address

I2C address

C16x9(IPin, II2cBus)

Creates a CharlieWing driver

Declaration
public C16x9(IPin onOffPin, II2cBus i2cBus)

Parameters

Type Name Description
IPin onOffPin

IO pin to controller display on/off state

II2cBus i2cBus

I2C bus

Properties

ColorMode

Color mode of display

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

DisplayOn

Turn the display on or off

Declaration
public bool DisplayOn { get; set; }

Property Value

Type Description
System.Boolean

Height

Height of display in pixels

Declaration
public int Height { get; }

Property Value

Type Description
System.Int32

IgnoreOutOfBoundsPixels

Gets/Sets property to ignore boundaries when drawing outside of the LED matrix

Declaration
public bool IgnoreOutOfBoundsPixels { get; set; }

Property Value

Type Description
System.Boolean

PixelBuffer

The buffer to hold the display data

Declaration
public IPixelBuffer PixelBuffer { get; protected set; }

Property Value

Type Description
IPixelBuffer

SupportedColorModes

Color mode of display

Declaration
public ColorMode SupportedColorModes { get; }

Property Value

Type Description
ColorMode

Width

Width of display in pixels

Declaration
public int Width { get; }

Property Value

Type Description
System.Int32

Methods

Clear(Boolean)

Clear display

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
System.Boolean updateDisplay

DrawBuffer(Int32, Int32, IPixelBuffer)

Draw a buffer to the display

Declaration
public void DrawBuffer(int x, int y, IPixelBuffer displayBuffer)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
IPixelBuffer displayBuffer

DrawPixel(Int32, Int32, Color)

Turn on an RGB LED with the specified color on (x,y) coordinates

Declaration
public void DrawPixel(int x, int y, Color color)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
Color color

DrawPixel(Int32, Int32, Boolean)

Turn on a LED on (x,y) coordinates

Declaration
public void DrawPixel(int x, int y, bool colored)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
System.Boolean colored

Fill(Color, Boolean)

Clear the display.

Declaration
public void Fill(Color clearColor, bool updateDisplay = false)

Parameters

Type Name Description
Color clearColor
System.Boolean updateDisplay

Fill(Int32, Int32, Int32, Int32, Color)

Clear the display

Declaration
public void Fill(int x, int y, int width, int height, Color fillColor)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
System.Int32 width
System.Int32 height
Color fillColor

InvertPixel(Int32, Int32)

Invert the color of the pixel at the given location

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
System.Int32 x

x location in pixels

System.Int32 y

y location in pixels

Show()

Show changes on the display

Declaration
public void Show()

Show(Byte)

Show changes on the display

Declaration
public void Show(byte frame)

Parameters

Type Name Description
System.Byte frame

Show(Int32, Int32, Int32, Int32)

Show changes on the display

Declaration
public void Show(int left, int top, int right, int bottom)

Parameters

Type Name Description
System.Int32 left
System.Int32 top
System.Int32 right
System.Int32 bottom

WriteBuffer(Int32, Int32, IPixelBuffer)

Write an external buffer to the display buffer

Declaration
public void WriteBuffer(int x, int y, IPixelBuffer buffer)

Parameters

Type Name Description
System.Int32 x

X postion to write buffer in pixels

System.Int32 y

Y postion to write buffer in pixels

IPixelBuffer buffer

The buffer to write