Remarks

OLED128x32Wing
Status
Source code GitHub
NuGet package

Code Example

public class MeadowApp : App<F7Micro, MeadowApp>
{
    OLED128x32Wing oledWing;
    GraphicsLibrary graphics;

    public MeadowApp()
    {
        Initialize();
        UpdateDisplay("OLED Wing");
    }

    void Initialize()
    {
        Console.WriteLine("Initialize hardware...");
        var i2cBus = Device.CreateI2cBus(I2cBusSpeed.FastPlus);

        oledWing = new OLED128x32Wing(i2cBus, Device, Device.Pins.D11, Device.Pins.D10, Device.Pins.D09);

        graphics = new GraphicsLibrary(oledWing.Display);
        graphics.CurrentFont = new Font12x16();

        oledWing.ButtonA.Clicked += (sender, e) =>
        {
            Console.WriteLine("A");
            UpdateDisplay("A pressed");
        };

        oledWing.ButtonB.Clicked += (sender, e) => 
        {
            Console.WriteLine("B");
            UpdateDisplay("B pressed");
        };

        oledWing.ButtonC.Clicked += (sender, e) => {
            Console.WriteLine("C");
            UpdateDisplay("C pressed");
        };
    }

    void UpdateDisplay(string message)
    {
        graphics.Clear();
        graphics.DrawText(0, 8, message);
        graphics.Show();
    }
}
Characteristic Locus
Inheritance System.Object > OLED128x32Wing
Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace Meadow.Foundation.FeatherWings
Assembly OLED128x32.dll

Syntax

public class OLED128x32Wing

Constructors

OLED128x32Wing(II2cBus, IDigitalInputPort, IDigitalInputPort, IDigitalInputPort)

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

Parameters

Type Name Description
II2cBus i2cBus
IDigitalInputPort portA
IDigitalInputPort portB
IDigitalInputPort portC

OLED128x32Wing(II2cBus, IIODevice, IPin, IPin, IPin)

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

Parameters

Type Name Description
II2cBus i2cBus
IIODevice device
IPin pinA
IPin pinB
IPin pinC

Properties

ButtonA

Declaration
public IButton ButtonA { get; protected set; }

Property Value

Type Description
IButton

ButtonB

Declaration
public IButton ButtonB { get; protected set; }

Property Value

Type Description
IButton

ButtonC

Declaration
public IButton ButtonC { get; protected set; }

Property Value

Type Description
IButton

Display

Declaration
public Ssd1306 Display { get; protected set; }

Property Value

Type Description
Ssd1306