CCSWE.nanoFramework.NeoPixel
1.0.65
See the version list below for details.
dotnet add package CCSWE.nanoFramework.NeoPixel --version 1.0.65
NuGet\Install-Package CCSWE.nanoFramework.NeoPixel -Version 1.0.65
<PackageReference Include="CCSWE.nanoFramework.NeoPixel" Version="1.0.65" />
paket add CCSWE.nanoFramework.NeoPixel --version 1.0.65
#r "nuget: CCSWE.nanoFramework.NeoPixel, 1.0.65"
// Install CCSWE.nanoFramework.NeoPixel as a Cake Addin #addin nuget:?package=CCSWE.nanoFramework.NeoPixel&version=1.0.65 // Install CCSWE.nanoFramework.NeoPixel as a Cake Tool #tool nuget:?package=CCSWE.nanoFramework.NeoPixel&version=1.0.65
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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- CCSWE.nanoFramework.Math (>= 0.1.48)
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.Graphics.Core (>= 1.2.22)
- nanoFramework.Hardware.Esp32.Rmt (>= 2.0.13)
- nanoFramework.Runtime.Events (>= 1.11.18)
- nanoFramework.System.Math (>= 1.5.43)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on CCSWE.nanoFramework.NeoPixel:
Repository | Stars |
---|---|
nanoframework/Samples
🍬 Code samples from the nanoFramework team used in testing, proof of concepts and other explorational endeavours
|
Version | Downloads | Last updated |
---|---|---|
1.0.66 | 85 | 11/26/2024 |
1.0.65 | 136 | 10/29/2024 |
1.0.64 | 101 | 10/22/2024 |
1.0.63 | 109 | 10/15/2024 |
1.0.62 | 109 | 10/8/2024 |
1.0.61 | 119 | 10/1/2024 |
1.0.60 | 100 | 9/26/2024 |
1.0.59 | 84 | 9/21/2024 |
1.0.58 | 85 | 9/21/2024 |
1.0.57 | 123 | 9/13/2024 |
1.0.56 | 117 | 8/31/2024 |
1.0.55 | 108 | 8/31/2024 |
1.0.54 | 107 | 8/29/2024 |
1.0.53 | 135 | 8/11/2024 |
1.0.52 | 106 | 8/11/2024 |
1.0.51 | 106 | 8/7/2024 |
1.0.50 | 75 | 8/5/2024 |
1.0.49 | 79 | 8/2/2024 |
1.0.48 | 81 | 8/2/2024 |
1.0.47 | 102 | 7/26/2024 |
1.0.46 | 120 | 7/25/2024 |
1.0.45 | 85 | 7/24/2024 |
1.0.44 | 111 | 7/18/2024 |
1.0.43 | 89 | 7/18/2024 |
1.0.42 | 100 | 7/17/2024 |
1.0.41 | 108 | 7/16/2024 |
1.0.40 | 95 | 7/15/2024 |
1.0.39 | 104 | 7/13/2024 |
1.0.38 | 97 | 7/13/2024 |
1.0.37 | 107 | 7/12/2024 |
1.0.36 | 108 | 7/1/2024 |
1.0.35 | 113 | 6/29/2024 |
1.0.34 | 120 | 6/26/2024 |
1.0.32 | 101 | 6/26/2024 |
1.0.25 | 101 | 6/21/2024 |
1.0.24 | 116 | 6/14/2024 |
1.0.23 | 107 | 6/13/2024 |
1.0.22 | 105 | 6/12/2024 |
1.0.21 | 108 | 6/5/2024 |
1.0.20 | 102 | 6/5/2024 |
1.0.18 | 113 | 6/4/2024 |
1.0.17 | 101 | 6/3/2024 |
1.0.16 | 99 | 6/3/2024 |
1.0.15 | 95 | 6/3/2024 |
1.0.14 | 112 | 6/3/2024 |
1.0.13 | 111 | 5/25/2024 |
1.0.12 | 104 | 5/24/2024 |
1.0.11 | 109 | 5/23/2024 |
1.0.10 | 104 | 5/19/2024 |
1.0.9 | 119 | 5/17/2024 |
1.0.8 | 115 | 5/16/2024 |
1.0.7 | 110 | 5/15/2024 |
1.0.6 | 95 | 5/13/2024 |
1.0.5 | 103 | 5/11/2024 |
1.0.4 | 114 | 5/10/2024 |
1.0.3 | 100 | 5/10/2024 |
1.0.2 | 133 | 4/26/2024 |
1.0.1 | 122 | 4/25/2024 |
1.0.0 | 114 | 4/25/2024 |
0.3.17 | 118 | 4/11/2024 |
0.3.16 | 113 | 4/10/2024 |
0.3.15 | 116 | 4/9/2024 |
0.3.14 | 109 | 4/8/2024 |
0.3.13 | 123 | 4/5/2024 |
0.3.12 | 110 | 4/4/2024 |
0.3.11 | 117 | 4/3/2024 |
0.3.10 | 101 | 3/23/2024 |
0.3.9 | 150 | 2/3/2024 |
0.3.8 | 111 | 2/1/2024 |
0.3.7 | 116 | 1/28/2024 |
0.3.6 | 96 | 1/26/2024 |
0.3.5 | 111 | 1/25/2024 |
0.3.4 | 256 | 11/20/2023 |
0.3.3 | 140 | 11/16/2023 |
0.3.2 | 149 | 11/10/2023 |
0.3.1 | 130 | 11/10/2023 |
0.3.0 | 108 | 11/10/2023 |
0.2.4 | 133 | 11/9/2023 |
0.2.3 | 132 | 11/8/2023 |
0.2.2 | 149 | 11/4/2023 |
0.2.1 | 144 | 11/3/2023 |
0.2.0 | 134 | 11/3/2023 |
0.1.6 | 132 | 11/2/2023 |
0.1.5 | 137 | 11/2/2023 |
0.1.4 | 125 | 11/2/2023 |
0.1.2 | 133 | 11/2/2023 |
0.1.1 | 120 | 11/2/2023 |
0.1.0 | 127 | 11/1/2023 |