CCSWE.nanoFramework.NeoPixel 0.3.17

There is a newer version of this package available.
See the version list below for details.
dotnet add package CCSWE.nanoFramework.NeoPixel --version 0.3.17
NuGet\Install-Package CCSWE.nanoFramework.NeoPixel -Version 0.3.17
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="CCSWE.nanoFramework.NeoPixel" Version="0.3.17" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CCSWE.nanoFramework.NeoPixel --version 0.3.17
#r "nuget: CCSWE.nanoFramework.NeoPixel, 0.3.17"
#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.
// Install CCSWE.nanoFramework.NeoPixel as a Cake Addin
#addin nuget:?package=CCSWE.nanoFramework.NeoPixel&version=0.3.17

// Install CCSWE.nanoFramework.NeoPixel as a Cake Tool
#tool nuget:?package=CCSWE.nanoFramework.NeoPixel&version=0.3.17

Build License NuGet

CCSWE.nanoFramework.NeoPixel

A fast ESP32 RMT library for controlling LED chipsets (NeoPixel, WS2812B, etc.)

I was originally using the Ws28xx.Esp32 but it was taking 600-700ms to update a strip of 50 LEDs. This was not fast enough for my use case so I set out to find a faster solution.

The NeoPixelStripLowMemory sample code was much faster at 50-60ms to update the same strip so that's where I started. I've also been looking at the FastLED library as I've used that in the past and it is indeed fast.

I've never spent time learning how these LEDs actually work so I'm learning as I go along and would love feedback or contributions from others with more experience in this area.

Usage

See samples for more details.

Initialize the strip

// Configure the number of LEDs
ushort count = 47;

// Adjust the pin number
byte pin = 19;

// Choose the correct driver and color order
var driver = new Ws2812B(ColorOrder.GRB);

// Create the strip
var strip = new NeoPixelStrip(pin, count, driver);

Set the LEDs

// Set all LEDs
strip.Fill(Color.Pink);

for (var i = 0; i < strip.Count; i++)
{
    if (i % 2 == 0)
    {
        // Set an individual LED
        strip.SetLed(i, Color.Blue);
    }
}

// Send the data to update the strip
strip.Update();

Brightness scaling

Both the Fill and SetPixel methods have overloads that allow you to pass a brightness scaling factor. If you will be using the same color for multiple calls then it is more efficient to call ColorConverter.ScaleBrightness(Color, double) directly and use the pre-scaled Color across multiple calls.

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

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.2 43 4/26/2024
1.0.1 43 4/25/2024
1.0.0 43 4/25/2024
0.3.17 81 4/11/2024
0.3.16 73 4/10/2024
0.3.15 77 4/9/2024
0.3.14 75 4/8/2024
0.3.13 81 4/5/2024
0.3.12 77 4/4/2024
0.3.11 77 4/3/2024
0.3.10 76 3/23/2024
0.3.9 108 2/3/2024
0.3.8 74 2/1/2024
0.3.7 80 1/28/2024
0.3.6 77 1/26/2024
0.3.5 74 1/25/2024
0.3.4 225 11/20/2023
0.3.3 112 11/16/2023
0.3.2 114 11/10/2023
0.3.1 98 11/10/2023
0.3.0 76 11/10/2023
0.2.4 100 11/9/2023
0.2.3 100 11/8/2023
0.2.2 111 11/4/2023
0.2.1 112 11/3/2023
0.2.0 104 11/3/2023
0.1.6 100 11/2/2023
0.1.5 100 11/2/2023
0.1.4 83 11/2/2023
0.1.2 95 11/2/2023
0.1.1 83 11/2/2023
0.1.0 88 11/1/2023