Skip to main content

Meadow.Foundation.Grove.Displays.OLEDDisplay1_12inch

OLEDDisplay1_12inch
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Grove.Displays.OLEDDisplay1_12inch

Code Example

OLEDDisplay1_12inch display;
MicroGraphics graphics;

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");

display = new OLEDDisplay1_12inch(Device.CreateI2cBus(), OLEDDisplayVersion.Version3x);

graphics = new MicroGraphics(display)
{
CurrentFont = new Font8x8(),
Rotation = RotationType._180Degrees
};

return Task.CompletedTask;
}

public override Task Run()
{
graphics.Clear();
graphics.DrawRectangle(0, 0, graphics.Width, graphics.Height, false);
graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
graphics.DrawRectangle(20, 15, 40, 20, true);
graphics.DrawText(5, 5, "SH1107");
graphics.Show();

return Task.CompletedTask;
}

Sample project(s) available on GitHub

Class OLEDDisplay1_12inch

Represents a Grove OLED 1.12inch display

Assembly: OLEDDisplay1_12inch.dll
View Source
Declaration
public class OLEDDisplay1_12inch : Sh1107, IPixelDisplay, IDisplay, ISpiPeripheral, II2cPeripheral, IDisposable

Inheritance: System.Object -> Meadow.Foundation.Displays.Sh110x -> Meadow.Foundation.Displays.Sh1107

Implements:
Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay, Meadow.Hardware.ISpiPeripheral, Meadow.Hardware.II2cPeripheral, System.IDisposable

Implements

  • Meadow.Peripherals.Displays.IPixelDisplay
  • Meadow.Peripherals.Displays.IDisplay
  • Meadow.Hardware.ISpiPeripheral
  • Meadow.Hardware.II2cPeripheral
  • System.IDisposable