Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Characteristic | Locus |
---|---|
Inheritance | object > CharlieWing |
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 | CharlieWing.dll |
Syntax
public class CharlieWing : IGraphicsDisplay
Constructors
CharlieWing(II2cBus, byte)
Creates a CharlieWing driver
Declaration
public CharlieWing(II2cBus i2cBus, byte address = 116)
Parameters
Type | Name | Description |
---|---|---|
II2cBus | i2cBus | The I2CBus used by the CharlieWing |
byte | address | The I2C address |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Fields
iS31FL3731
Is31fl3731 object to manage the leds
Declaration
protected readonly Is31fl3731 iS31FL3731
Field Value
Type | Description |
---|---|
Is31fl3731 |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Properties
ColorMode
Color mode of display
Declaration
public ColorMode ColorMode { get; }
Property Value
Type | Description |
---|---|
ColorMode |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Frame
The Is31fl3731 active frame
Declaration
public byte Frame { get; set; }
Property Value
Type | Description |
---|---|
byte |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Height
Height of display in pixels
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
PixelBuffer
The pixel buffer that represents the offscreen buffer Not implemented for this driver
Declaration
public IPixelBuffer PixelBuffer { get; }
Property Value
Type | Description |
---|---|
IPixelBuffer |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
SupportedColorModes
Color modes supported by the device
Declaration
public ColorMode SupportedColorModes { get; }
Property Value
Type | Description |
---|---|
ColorMode |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Width
Width of display in pixels
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Methods
Clear(bool)
Clear the display buffer
Declaration
public void Clear(bool updateDisplay = false)
Parameters
Type | Name | Description |
---|---|---|
bool | updateDisplay | Force a display update if true, false to clear the buffer |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
DrawPixel(int, int, byte)
Turn on LED with the specified brightness on (x,y) coordinates
Declaration
public void DrawPixel(int x, int y, byte brightness)
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 |
byte | brightness | The led brightness from 0-255 |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Show()
Update the display from the offscreen buffer
Declaration
public void Show()
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
Show(byte)
Update the display from a specific iS31FL3731 frame
Declaration
public void Show(byte frame)
Parameters
Type | Name | Description |
---|---|---|
byte | frame | The frame to show (0-7) |
Remarks
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}
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
CharlieWing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
CharlieWing charlieWing;
MicroGraphics graphics;
public override Task Initialize()
{
Console.WriteLine("Initialize...");
charlieWing = new CharlieWing(Device.CreateI2cBus());
graphics = new MicroGraphics(charlieWing)
{
CurrentFont = new Font4x8()
};
return Task.CompletedTask;
}
public override Task Run()
{
graphics.Clear();
graphics.DrawText(0, 0, "F7");
graphics.Show();
return Task.CompletedTask;
}