Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Characteristic Locus
Inheritance object > DotstarWing
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.FeatherWings
Assembly DotstarWing.dll

Syntax

public class DotstarWing : IGraphicsDisplay

Constructors

DotstarWing(ISpiBus)

Creates a DotstarWing driver

Declaration
public DotstarWing(ISpiBus spiBus)

Parameters

Type Name Description
ISpiBus spiBus

The SPI bus used by the Dotstar Wing

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Properties

Brightness

Get/Sets the RGB LED Matrix brightness

Declaration
public float Brightness { get; set; }

Property Value

Type Description
float

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

ColorMode

Returns the color mode

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Height

Returns the height of the RGB LED matrix

Declaration
public int Height { get; }

Property Value

Type Description
int

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

PixelBuffer

Get the offscreen pixel buffer

Declaration
public IPixelBuffer PixelBuffer { get; }

Property Value

Type Description
IPixelBuffer

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

SupportedColorModes

Color modes supported by the device

Declaration
public ColorMode SupportedColorModes { get; }

Property Value

Type Description
ColorMode

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Width

Returns the width of the RGB LED matrix

Declaration
public int Width { get; }

Property Value

Type Description
int

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Methods

Clear(bool)

Clear the RGB LED Matrix buffer

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
bool updateDisplay

If true, update the display, if false, only clear the buffer

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

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

The x position in pixels 0 indexed from the left

int y

The y position in pixels 0 indexed from the top

Color color

The color to draw normalized to black/off or white/on

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

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

The x position in pixels 0 indexed from the left

int y

The y position in pixels 0 indexed from the top

bool colored

Led is on if true, off if false

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Fill(Color, bool)

Fill the display buffer to a normalized color

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

Parameters

Type Name Description
Color fillColor

The clear color which will be normalized to black/off or white/on

bool updateDisplay

Force a display update if true, false to clear the buffer

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

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

Fill the display

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

Parameters

Type Name Description
int x

The x position in pixels 0 indexed from the left

int y

The y position in pixels 0 indexed from the top

int width

The width to fill in pixels

int height

The height to fill in pixels

Color fillColor

The fillColor color which will be normalized to black/off or white/on

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

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

The x position in pixels 0 indexed from the left

int y

The y position in pixels 0 indexed from the top

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Show()

Update the display from the offscreen buffer

Declaration
public void Show()

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Show(int, int, int, int)

Update a region of the display from the offscreen buffer

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

Parameters

Type Name Description
int left

The left bounding position in pixels

int top

The top bounding position in pixels

int right

The right bounding position in pixels

int bottom

The bottom bounding position in pixels

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

WriteBuffer(int, int, IPixelBuffer)

Draw a buffer to the display

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

Parameters

Type Name Description
int x

The x position in pixels 0 indexed from the left

int y

The y position in pixels 0 indexed from the top

IPixelBuffer displayBuffer

The display buffer to draw to the CharlieWing

Remarks

DotstarWing
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.FeatherWings.DotstarWing

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var spiBus = Device.CreateSpiBus();
    dotStarWing = new DotstarWing(spiBus)
    {
        Brightness = 0.1f
    };
    graphics = new MicroGraphics(dotStarWing)
    {
        CurrentFont = new Font4x6()
    };

    return Task.CompletedTask;
}

public override Task Run()
{
    graphics.Clear();

    graphics.DrawRectangle(0, 0, 8, 4, Color.LawnGreen, true);
    graphics.DrawRectangle(2, 2, 8, 4, Color.Cyan, true);
    graphics.DrawText(0, 0, "F7", Color.White);

    graphics.Show();

    return Task.CompletedTask;
}

Sample project(s) available on GitHub