Remarks

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

Code Example

OLED128x32Wing oledWing;
MicroGraphics graphics;

public override Task Initialize()
{
    Console.WriteLine("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 pressed");
    oledWing.ButtonB.Clicked += (sender, e) => UpdateDisplay("B pressed");
    oledWing.ButtonC.Clicked += (sender, e) => UpdateDisplay("C pressed");

    return Task.CompletedTask;
}

void UpdateDisplay(string message)
{
    graphics.Clear();
    graphics.DrawText(0, 8, message);
    graphics.Show();
}

Sample project(s) available on GitHub

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

Syntax

public class OLED128x32Wing : object

Constructors

OLED128x32Wing(II2cBus, IDigitalInputPort, IDigitalInputPort, IDigitalInputPort)

Creates a OLED128x32Wing driver

Declaration
public OLED128x32Wing(II2cBus i2cBus, IDigitalInputPort portA, IDigitalInputPort portB, IDigitalInputPort portC)

Parameters

Type Name Description
II2cBus i2cBus

The I2C bus connected to the wing

IDigitalInputPort portA

The digital port for button A

IDigitalInputPort portB

The digital port for button B

IDigitalInputPort portC

The digital port for button C

OLED128x32Wing(II2cBus, IPin, IPin, IPin)

Creates a OLED128x32Wing driver

Declaration
public OLED128x32Wing(II2cBus i2cBus, IPin pinA, IPin pinB, IPin pinC)

Parameters

Type Name Description
II2cBus i2cBus

The I2C bus connected to the wing

IPin pinA

The pin used for button A

IPin pinB

The pin used for button B

IPin pinC

The pin used for button C

Properties

ButtonA

Returns button A

Declaration
public PushButton ButtonA { get; protected set; }

Property Value

Type Description
PushButton

ButtonB

Returns button B

Declaration
public PushButton ButtonB { get; protected set; }

Property Value

Type Description
PushButton

ButtonC

Returns button C

Declaration
public PushButton ButtonC { get; protected set; }

Property Value

Type Description
PushButton

Display

Returns Ssd1306 object

Declaration
public Ssd1306 Display { get; protected set; }

Property Value

Type Description
Ssd1306