Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Characteristic Locus
Inheritance object > C16x9
Implements IGraphicsDisplay
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
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 = 116)

Parameters

Type Name Description
IDigitalOutputPort onOffPort

On/Off port

II2cBus i2cBus

I2C bus

byte address

I2C address

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

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

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Properties

ColorMode

Color mode of display

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

DisplayOn

Turn the display on or off

Declaration
public bool DisplayOn { get; set; }

Property Value

Type Description
bool

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Height

Height of display in pixels

Declaration
public int Height { get; }

Property Value

Type Description
int

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

IgnoreOutOfBoundsPixels

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

Declaration
public bool IgnoreOutOfBoundsPixels { get; set; }

Property Value

Type Description
bool

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

PixelBuffer

The buffer to hold the display data

Declaration
public IPixelBuffer PixelBuffer { get; protected set; }

Property Value

Type Description
IPixelBuffer

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

SupportedColorModes

Color mode of display

Declaration
public ColorMode SupportedColorModes { get; }

Property Value

Type Description
ColorMode

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Width

Width of display in pixels

Declaration
public int Width { get; }

Property Value

Type Description
int

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Methods

Clear(bool)

Clear display

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
bool updateDisplay

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

DrawBuffer(int, int, IPixelBuffer)

Draw a buffer to the display

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

Parameters

Type Name Description
int x
int y
IPixelBuffer displayBuffer

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

DrawPixel(int, int, 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
int x
int y
Color color

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

DrawPixel(int, int, bool)

Turn on a LED on (x,y) coordinates

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

Parameters

Type Name Description
int x
int y
bool colored

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Fill(Color, bool)

Clear the display.

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

Parameters

Type Name Description
Color clearColor
bool updateDisplay

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

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

Clear the display

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

Parameters

Type Name Description
int x
int y
int width
int height
Color fillColor

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

InvertPixel(int, int)

Invert the color of the pixel at the given location

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
int x

x location in pixels

int y

y location in pixels

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Show()

Show changes on the display

Declaration
public void Show()

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Show(byte)

Show changes on the display

Declaration
public void Show(byte frame)

Parameters

Type Name Description
byte frame

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

Show(int, int, int, int)

Show changes on the display

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

Parameters

Type Name Description
int left
int top
int right
int bottom

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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

WriteBuffer(int, int, IPixelBuffer)

Write an external buffer to the display buffer

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

Parameters

Type Name Description
int x

X postion to write buffer in pixels

int y

Y postion to write buffer in pixels

IPixelBuffer buffer

The buffer to write

Remarks

C16x9
Status Status badge: working
Source code GitHub
NuGet package NuGet 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