OledSharp.SSD1306
1.0.0
dotnet add package OledSharp.SSD1306 --version 1.0.0
NuGet\Install-Package OledSharp.SSD1306 -Version 1.0.0
<PackageReference Include="OledSharp.SSD1306" Version="1.0.0" />
<PackageVersion Include="OledSharp.SSD1306" Version="1.0.0" />
<PackageReference Include="OledSharp.SSD1306" />
paket add OledSharp.SSD1306 --version 1.0.0
#r "nuget: OledSharp.SSD1306, 1.0.0"
#:package OledSharp.SSD1306@1.0.0
#addin nuget:?package=OledSharp.SSD1306&version=1.0.0
#tool nuget:?package=OledSharp.SSD1306&version=1.0.0
OledSharp.SSD1306
A .NET 8.0 implementation of IOledDisplay
for SSD1306 OLED displays. This library provides direct hardware control for 128x64 pixel SSD1306 OLED displays via I2C communication.
This is a hardware-specific implementation. For the main library documentation and general usage, see OledSharp.
Overview
This library provides the SSD1306Display
class which implements the IOledDisplay
interface from the base OledSharp library. It handles low-level communication with SSD1306 OLED displays and provides pixel-level control.
Installation
To install the OledSharp.SSD1306 library via NuGet, run the following command in your project directory:
dotnet add package OledSharp.SSD1306
Features
- 128x64 pixel resolution - Standard SSD1306 display size
- I2C communication - Uses System.Device.I2c for hardware communication
- Individual pixel control - Set/get individual pixels in the display buffer
- Hardware initialization - Proper SSD1306 initialization sequence
- Resource management - Implements IDisposable for proper cleanup
Dependencies
- OledSharp - Base library for display abstraction (see OledSharp)
- System.Device.I2c - I2C communication
- Iot.Device.Bindings - IoT device bindings
Usage Example
using OledSharp.SSD1306;
// Create SSD1306 display instance (I2C bus 1, device address 0x3C)
using (IOledDisplay display = new SSD1306Display(busId: 1, deviceAddress: 0x3C))
{
display.Initialize();
// Create text renderer
TextRenderer renderer = new TextRenderer(display);
// Draw with word wrapping
renderer.DrawWrappedString(
x: 2, // 2 px in from the left edge
y: 2, // 2 px in from the left edge
text: "This is a long text that will wrap",
maxWidth: display.Width - 4); // 2 px from the right edge too
// Draw individual pixels
display.SetBufferPixel(10, 10, true);
display.SetBufferPixel(11, 11, true);
// Push changes to display
display.PushBuffer();
}
Constructor Options
With I2C Bus ID and Device Address
SSD1306Display display = new SSD1306Display(busId: 1, deviceAddress: 0x3C);
With Existing I2C Device
I2cDevice i2cDevice = I2cDevice.Create(settings);
SSD1306Display display = new SSD1306Display(i2cDevice);
Hardware Requirements
- SSD1306 OLED Display - 128x64 pixel resolution
- I2C Interface - Standard I2C communication
- Device Address - Typically 0x3C (default) or 0x3D
License
MIT License - see project file for details.
Repository
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Iot.Device.Bindings (>= 4.0.1)
- OledSharp (>= 1.0.0)
- System.Device.Gpio (>= 4.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 48 | 9/7/2025 |