Meadow.Foundation.FeatherWings.OLED128x32Wing
OLED128x32Wing | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
OLED128x32Wing oledWing;
MicroGraphics graphics;
public override Task Initialize()
{
Resolver.Log.Info("Initializing...");
var i2cBus = Device.CreateI2cBus(I2cBusSpeed.FastPlus);
oledWing = new OLED128x32Wing(i2cBus, Device.Pins.D11, Device.Pins.D10, Device.Pins.D09);
graphics = new MicroGraphics(oledWing.Display);
graphics.CurrentFont = new Font12x16();
oledWing.ButtonA.Clicked += (sender, e) => UpdateDisplay("A Clicked");
oledWing.ButtonB.Clicked += (sender, e) => UpdateDisplay("B Clicked");
oledWing.ButtonC.Clicked += (sender, e) => UpdateDisplay("C Clicked");
UpdateDisplay("Ready");
return Task.CompletedTask;
}
void UpdateDisplay(string message)
{
graphics.Clear();
graphics.DrawText(x: 0, y: 8, message);
graphics.Show();
}
Sample project(s) available on GitHub
Class OLED128x32Wing
Represents Adafruit's 128 x 32 OLED Feather Wing
Assembly: OLED128x32.dll
View Source
Declaration
public class OLED128x32Wing
Properties
Display
Returns Ssd1306 object
View Source
Declaration
public Ssd1306 Display { get; protected set; }
ButtonA
Returns button A
View Source
Declaration
public PushButtonBase ButtonA { get; protected set; }
ButtonB
Returns button B
View Source
Declaration
public PushButtonBase ButtonB { get; protected set; }
ButtonC
Returns button C
View Source
Declaration
public PushButtonBase ButtonC { get; protected set; }