Pi5MatrixSharp 0.1.0-preview.1

This is a prerelease version of Pi5MatrixSharp.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Pi5MatrixSharp --version 0.1.0-preview.1
                    
NuGet\Install-Package Pi5MatrixSharp -Version 0.1.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pi5MatrixSharp" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pi5MatrixSharp" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Pi5MatrixSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pi5MatrixSharp --version 0.1.0-preview.1
                    
#r "nuget: Pi5MatrixSharp, 0.1.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Pi5MatrixSharp@0.1.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pi5MatrixSharp&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Pi5MatrixSharp&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

Pi5MatrixSharp

Pi5MatrixSharp is a C# wrapper for driving HUB75 RGB LED matrix panels on the Raspberry Pi 5 using Adafruit's Piomatter backend.

It is aimed at the "keep my app in C#" case: render however you like in managed code, then push the final frame to the panel through a small native shim.

Status

  • Raspberry Pi 5 only
  • Linux ARM64 only
  • Native backend bundled as libpi5matrix.so
  • Tested against Adafruit's Adafruit_Blinka_Raspberry_Pi5_Piomatter at commit 9ce4965a3fddf5b44c9da6c8dc3738cfe0403028

Install

The package is prepared for NuGet, but until it is published you should use the .nupkg attached to the latest GitHub release or build one locally with ./scripts/pack.sh.

Once published to NuGet, installation will be:

dotnet add package Pi5MatrixSharp

Quick Start

using Pi5MatrixSharp;

var options = new Pi5MatrixOptions
{
    Pinout = Pi5MatrixPinout.AdafruitMatrixBonnet,
    Geometry = new Pi5MatrixGeometryOptions
    {
        Width = 64,
        Height = 32,
        AddressLineCount = 4
    }
};

using var matrix = new Pi5Matrix(options);

matrix.Clear();
matrix.SetPixel(0, 0, 255, 0, 0);
matrix.SetPixel(1, 0, 0, 255, 0);
matrix.SetPixel(2, 0, 0, 0, 255);
matrix.Show();

For a runnable example, see samples/Pi5MatrixSharp.Sample.

Requirements

  • Raspberry Pi 5
  • 64-bit Raspberry Pi OS with /dev/pio0
  • User in the gpio group
  • A supported pinout:
    • AdafruitMatrixBonnet
    • AdafruitMatrixBonnetBgr
    • Active3
    • Active3Bgr

Building The Native Library

The repo includes a rebuild script that fetches the pinned Adafruit Piomatter source and rebuilds the native shim directly on Linux:

./scripts/rebuild-libpi5matrix.sh

That script updates:

runtimes/linux-arm64/native/libpi5matrix.so

It is best run on the Raspberry Pi 5 you intend to test with.

Packaging

To build the NuGet package locally:

./scripts/pack.sh

The resulting package is written to:

artifacts/nuget

Releasing

The intended release flow is:

  1. Build and test with ./scripts/pack.sh
  2. Create a Git tag such as v0.1.0-preview.1
  3. Publish a GitHub release and attach the generated .nupkg
  4. Push the same package to NuGet once a NUGET_API_KEY repo secret is configured

License

This project is distributed under GPL-2.0-only. See LICENSE.

The bundled native backend is built on top of Adafruit's GPL-2.0-only Pi 5 Piomatter implementation. See THIRD_PARTY_NOTICES.md.

Product 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

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
0.3.0-beta.1 38 3/23/2026
0.2.0 82 3/21/2026
0.1.0 101 3/17/2026
0.1.0-preview.1 34 3/17/2026