This package includes the .NET nanoFramework binding Ws28xx (specific for ESP32 devices) for .NET nanoFramework C# projects.
Get Started
No framework information available.
README
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 sample.
Important: This implementation is for ESP32 boards only. Do not use with other boards. USe the SPI implementation instead.
Documentation
- WS2812B: Datasheet
- WS2815B: Datasheet
- WS2808: Datasheet
- SK6812: Datasheet
- Neo pixels guide
- Neo pixels x8 stick
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.
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 timing values of the T0L, T0H, T1L, T1H and Reset should be taken from the data sheet of the led strip.
The T0L and T0H are the pulse coding for the zero bit.
The T1L and T1H are the pulse coding for the one bit.
And a Reset is the pulse used at the end of the pulse sequence to indicate the end.
Each timing value is 10MHz based so is 100ns in length. Use that to calculate timing values. i.e for 600ns length use pulse count of 6.
Limitations
If you are using a 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.
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.