Remarks

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

Code Example

DotstarWing dotStarWing;
MicroGraphics graphics;
public MeadowApp()
{
    Console.WriteLine("Initialize hardware...");
    ISpiBus spiBus = Device.CreateSpiBus();

    dotStarWing = new DotstarWing(spiBus);

    dotStarWing.Brightness = 0.1f;

    graphics = new MicroGraphics(dotStarWing);
    graphics.CurrentFont = new Font4x6();

    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();
}

Sample project(s) available on GitHub

Characteristic Locus
Inheritance System.Object > DotstarWing
Namespace Meadow.Foundation.FeatherWings
Assembly DotstarWing.dll

Syntax

public class DotstarWing : IGraphicsDriver

Constructors

DotstarWing(ISpiBus)

Declaration
public DotstarWing(ISpiBus spiBus)

Parameters

Type Name Description
ISpiBus spiBus

DotstarWing(ISpiBus, Int32, Apa102.PixelOrder)

Declaration
public DotstarWing(ISpiBus spiBus, int numberOfLeds, Apa102.PixelOrder pixelOrder = Apa102.PixelOrder.BGR)

Parameters

Type Name Description
ISpiBus spiBus
System.Int32 numberOfLeds
Apa102.PixelOrder pixelOrder

Properties

Brightness

Declaration
public float Brightness { get; set; }

Property Value

Type Description
System.Single

ColorMode

Declaration
public ColorType ColorMode { get; }

Property Value

Type Description
ColorType

Height

Declaration
public int Height { get; }

Property Value

Type Description
System.Int32

IgnoreOutOfBoundsPixels

Declaration
public bool IgnoreOutOfBoundsPixels { get; set; }

Property Value

Type Description
System.Boolean

PixelBuffer

This device does not use a pixel buffer, it's methods directly light up LEDs on the device.

Declaration
public IPixelBuffer PixelBuffer { get; }

Property Value

Type Description
IPixelBuffer

Width

Declaration
public int Width { get; }

Property Value

Type Description
System.Int32

Methods

Clear(Boolean)

Declaration
public void Clear(bool updateDisplay = false)

Parameters

Type Name Description
System.Boolean updateDisplay

DrawBuffer(Int32, Int32, IPixelBuffer)

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)

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)

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)

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

Parameters

Type Name Description
Color fillColor
System.Boolean updateDisplay

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

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)

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
System.Int32 x
System.Int32 y

Show()

Declaration
public void Show()

Show(Int32, Int32, Int32, Int32)

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