Meadow.Foundation.Displays.St7565
| St7565 | |
|---|---|
| Status | |
| Source code | GitHub |
| Datasheet(s) | GitHub |
| NuGet package |
Code Example
MicroGraphics graphics;
public override Task Initialize()
{
Resolver.Log.Info("Initializing...");
var sT7565 = new St7565
(
spiBus: Device.CreateSpiBus(),
chipSelectPin: Device.Pins.D02,
dcPin: Device.Pins.D00,
resetPin: Device.Pins.D01,
width: 128,
height: 64
);
graphics = new MicroGraphics(sT7565);
graphics.CurrentFont = new Font8x8();
return base.Initialize();
}
public override Task Run()
{
graphics.Clear();
graphics.DrawTriangle(10, 10, 50, 50, 10, 50, false);
graphics.DrawRectangle(20, 15, 40, 20, true);
graphics.DrawText(5, 5, "ST7565");
graphics.Show();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a ST7565 to your Meadow board, connect the following:
| ST7565 | Meadow Pin |
|---|---|
| LEDA | GND |
| GND | GND |
| VCC | 3V3 |
| SDA | MOSI |
| SCL | SCK |
| A0 | D00 |
| RST | D01 |
| CS | D02 |
