VOOZH about

URL: https://www.nuget.org/packages/nanoFramework.Iot.Device.Ws28xx.Esp32/

⇱ NuGet Gallery | nanoFramework.Iot.Device.Ws28xx.Esp32 1.2.955




👁 Image
nanoFramework.Iot.Device.Ws28xx.Esp32 1.2.955

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Ws28xx.Esp32 --version 1.2.955
 
 
NuGet\Install-Package nanoFramework.Iot.Device.Ws28xx.Esp32 -Version 1.2.955
 
 
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="nanoFramework.Iot.Device.Ws28xx.Esp32" Version="1.2.955" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Ws28xx.Esp32" Version="1.2.955" />
 
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Ws28xx.Esp32" />
 
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 nanoFramework.Iot.Device.Ws28xx.Esp32 --version 1.2.955
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Ws28xx.Esp32, 1.2.955"
 
 
#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 nanoFramework.Iot.Device.Ws28xx.Esp32@1.2.955
 
 
#: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=nanoFramework.Iot.Device.Ws28xx.Esp32&version=1.2.955
 
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Ws28xx.Esp32&version=1.2.955
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Ws28xx/WS2812B/WS2815B/WS2808/SK6812/Neo pixel for ESP32 using RMT - LED drivers

This binding allows you to update the RGB LEDs on Ws28xx, SK6812 and based strips and matrices.

To see how to use the binding in code, see the .

Important: This implementation is for ESP32 boards only. Do not use with other boards. USe the instead.

Documentation

Board

WS2812B

Usage

using Iot.Device.Ws28xx.Esp32;
using System.Diagnostics;
using System.Drawing;

// Configure the count of pixels
const int Count = 10;
// Adjust the pin number
const int Pin = 15;

// Use Ws2812 or SK6812 instead if needed
Ws28xx neo = new Ws2808(Pin, Count);
Rainbow(neo, Count);

void Rainbow(Ws28xx neo, int count, int iterations = 1)
{
 BitmapImage img = neo.Image;
 for (var i = 0; i < 255 * iterations; i++)
 {
 for (var j = 0; j < count; j++)
 { 
 img.SetPixel(j, 0, Wheel((i + j) & 255));
 }

 neo.Update();
 }
}

Using BitmapImage

The BitmapImage gives you the opportunity to work on rectangular matrix. For example is you are using a M5Stack Atom Matrix, you'll be able to use a 5 x 5 matrix. In this case, you'll be able to set a specific pixel with coordinates using the SetPixel function.

Also nothing is display before the Update function is called.

Advance usage

The Ws28xx class provide a generic driver. In case your strip is not supported or colors are inverted or coded in a different number of colors, you can use specific definitions and create your own class. Here is the example for the SK6812 used in the M5Stack Fire for example:

public Sk6812(int gpioPin, int width, int height = 1)
 : base(gpioPin, new BitmapImageWs2808Grb(width, height))
{
 ClockDivider = 4;
 OnePulse = new(14, true, 12, false);
 ZeroPulse = new(7, true, 16, false);
 ResetCommand = new(500, false, 520, false);
}

The various BitmapImage*** classes already take into account the color schemes, the bit per color coding. Use one of them to accommodate your needs.

The pulses are calculated based on the datasheet of each driver. A OnePulse is a pulse coding for a bit high = 1. A ZeroPulse is coding for a bit low = 0. And a ResetCommand is the command used in some drivers at the end of the pulse chain.

Each pulse is 80MHz based and then divided by the ClockDivider. You have to take this into account to make the proper math for the pulses.

Limitations

If you are using a very very long chain, depending on your board and the memory available on it, you can be out of memory while preparing the pulse chain to send.

Product Versions Compatible and additional computed target framework versions.
.NET Framework net net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on nanoFramework.Iot.Device.Ws28xx.Esp32:

Package Downloads
nanoFramework.AtomLite

This package includes the nanoFramework.AtomLite assembly for .NET nanoFramework C# projects.

nanoFramework.AtomMatrix

This package includes the nanoFramework.AtomMatrix assembly for .NET nanoFramework C# projects.

nanoFramework.Fire

This package includes the nanoFramework.Fire assembly for .NET nanoFramework C# projects.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on nanoFramework.Iot.Device.Ws28xx.Esp32:

Repository Stars
nanoframework/Samples
🍬 Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
nanoframework/nanoFramework.M5Stack
📦 Board support package for M5Stack, M5StickC and M5StickCPlus for .NET nanoFramework
Version Downloads Last Updated
2.0.0-preview.85 56 6/1/2026
2.0.0-preview.80 56 5/27/2026
2.0.0-preview.69 99 5/18/2026
2.0.0-preview.62 59 5/13/2026
2.0.0-preview.49 82 5/4/2026
2.0.0-preview.45 62 4/29/2026
2.0.0-preview.40 61 4/27/2026
2.0.0-preview.37 62 4/22/2026
2.0.0-preview.32 62 4/20/2026
2.0.0-preview.18 97 3/11/2026
2.0.0-preview.16 71 3/10/2026
1.2.955 518 3/6/2026
1.2.907 901 10/2/2025
1.2.864 1,128 4/2/2025
1.2.852 630 3/11/2025
1.2.835 754 2/27/2025
1.2.829 559 2/27/2025
1.2.822 566 2/26/2025
1.2.794 981 2/7/2025
1.2.772 745 2/4/2025
Loading failed