Skip to main content

Meadow.Foundation.Displays.Sh1106

Sh1106
StatusStatus badge: working
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Displays.Sh110x

Code Example

MicroGraphics graphics;

publicoverrideTaskInitialize()
{
Resolver.Log.Info("Initializing...");

var sh1106 =newSh1106
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D01,
resetPin: Device.Pins.D00
);

graphics =newMicroGraphics(sh1106);
graphics.CurrentFont =newFont8x8();
graphics.Rotation = RotationType._180Degrees;

returnbase.Initialize();
}

publicoverrideTaskRun()
{
graphics.Clear();
graphics.DrawRectangle(0,0,128,64,false);
graphics.DrawTriangle(10,10,50,50,10,50,false);
graphics.DrawRectangle(20,15,40,20,true);
graphics.DrawText(5,5,"SH1106");
graphics.Show();

returnbase.Run();
}

Sample project(s) available on GitHub

close