Skip to main content

Meadow.Foundation.mikroBUS.Displays.C16x9

C16x9
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.mikroBUS.Displays.C16x9

Code Example

C16x9 c16x9;

public MeadowApp()
{
Console.WriteLine("Initializing ...");

c16x9 = new C16x9(Device.Pins.D14, Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.Standard));
c16x9.IgnoreOutOfBoundsPixels = true;

c16x9.Clear();

var graphics = new MicroGraphics(c16x9)
{
Rotation = RotationType._180Degrees
};
graphics.CurrentFont = new Font4x8();

var message = "Wilderness Labs Meadow F7 Feather";

while (true)
{
for (int x = 0; x < message.Length * 4; x++)
{
graphics.Clear();
graphics.DrawText(0 - x, 1, message);
graphics.Show();
}
}
}

Sample project(s) available on GitHub

Class C16x9

Represents a mikroBUS 16x9 Click board

Assembly: C16x9.dll
View Source
Declaration
public class C16x9 : IPixelDisplay, IDisplay

Implements:
Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay

Properties

PixelBuffer

The buffer to hold the display data

View Source
Declaration
public IPixelBuffer PixelBuffer { get; protected set; }

ColorMode

Color mode of display

View Source
Declaration
public ColorMode ColorMode { get; }

SupportedColorModes

Color mode of display

View Source
Declaration
public ColorMode SupportedColorModes { get; }

Width

Width of display in pixels

View Source
Declaration
public int Width { get; }

Height

Height of display in pixels

View Source
Declaration
public int Height { get; }

IgnoreOutOfBoundsPixels

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

View Source
Declaration
public bool IgnoreOutOfBoundsPixels { get; set; }

DisplayOn

Turn the display on or off

View Source
Declaration
public bool DisplayOn { get; set; }

Methods

Clear(bool)

Clear display

View Source
Declaration
public void Clear(bool updateDisplay = false)
Parameters
TypeName
System.BooleanupdateDisplay

DrawPixel(int, int, Color)

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

View Source
Declaration
public void DrawPixel(int x, int y, Color color)
Parameters
TypeName
System.Int32x
System.Int32y
Meadow.Colorcolor

DrawPixel(int, int, bool)

Turn on a LED on (x,y) coordinates

View Source
Declaration
public void DrawPixel(int x, int y, bool colored)
Parameters
TypeName
System.Int32x
System.Int32y
System.Booleancolored

InvertPixel(int, int)

Invert the color of the pixel at the given location

View Source
Declaration
public void InvertPixel(int x, int y)
Parameters
TypeNameDescription
System.Int32xx location in pixels
System.Int32yy location in pixels

DrawBuffer(int, int, IPixelBuffer)

Draw a buffer to the display

View Source
Declaration
public void DrawBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeName
System.Int32x
System.Int32y
Meadow.Peripherals.Displays.IPixelBufferdisplayBuffer

Fill(Color, bool)

Clear the display.

View Source
Declaration
public void Fill(Color clearColor, bool updateDisplay = false)
Parameters
TypeName
Meadow.ColorclearColor
System.BooleanupdateDisplay

Fill(int, int, int, int, Color)

Clear the display

View Source
Declaration
public void Fill(int x, int y, int width, int height, Color fillColor)
Parameters
TypeName
System.Int32x
System.Int32y
System.Int32width
System.Int32height
Meadow.ColorfillColor

Show()

Show changes on the display

View Source
Declaration
public void Show()

Show(int, int, int, int)

Show changes on the display

View Source
Declaration
public void Show(int left, int top, int right, int bottom)
Parameters
TypeName
System.Int32left
System.Int32top
System.Int32right
System.Int32bottom

Show(byte)

Show changes on the display

View Source
Declaration
public void Show(byte frame)
Parameters
TypeName
System.Byteframe

WriteBuffer(int, int, IPixelBuffer)

Write an external buffer to the display buffer

View Source
Declaration
public void WriteBuffer(int x, int y, IPixelBuffer buffer)
Parameters
TypeNameDescription
System.Int32xX postion to write buffer in pixels
System.Int32yY postion to write buffer in pixels
Meadow.Peripherals.Displays.IPixelBufferbufferThe buffer to write

Implements

  • Meadow.Peripherals.Displays.IPixelDisplay
  • Meadow.Peripherals.Displays.IDisplay