Library / SDK
adafruit/Adafruit_NeoPixel avatar
adafruit/Adafruit_NeoPixel

Adafruit NeoPixel: an Arduino library for single-wire addressable LEDs

Arduino library for controlling single-wire LED pixels (NeoPixel, WS2812, etc.)

3,423 stars1,322 forksC++LGPL-3.0

At a glance

What is it?
Adafruit_NeoPixel drives WS2812-style pixels from an Arduino sketch with one data pin. This review covers the supported chipsets, the install paths, the timing constraints and the cases where FastLED is the better pick.
Who is it for?
Adafruit_NeoPixel is the right choice when you have an Arduino-compatible board, a strip or ring of WS2812-style pixels, and a sketch that needs to keep compiling for years; the roadmap's Prime Directive is backward compatibility, and the last push was on 2026-05-12 with release 1.15.5.
Can I use it commercially?
Yes, with conditions. LGPL-3.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 140 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What Adafruit_NeoPixel actually takes off your plate

Driving a WS2812-style pixel means emitting a precise serial bitstream where a long high pulse is a 1 and a short high pulse is a 0, then holding the line low long enough for the strip to latch. The README is blunt about this: "Controlling NeoPixels 'from scratch' is quite a challenge, so we provide a library letting you focus on the fun and interesting bits." That is the whole pitch. The library owns the bit timing, the colour order (NEO_GRB, NEO_RGB and similar), the 800 KHz versus 400 KHz rate, and the latch delay. You own the pixel values and the animation logic.

The audience is narrow and specific: someone with an Arduino-compatible board and a strip, ring, stick, shield or breadboard pixel from Adafruit's ecosystem. The README lists the Adafruit 60 LED/meter Digital LED strip, the FLORA RGB Smart Pixel, the Breadboard-friendly RGB Smart Pixel, the NeoPixel Stick and the NeoPixel Shield as the target hardware. If you are writing firmware for a custom LED matrix on an unsupported MCU, this library is not aimed at you, and the README says so indirectly by pointing at forks: "Check forks for other architectures not listed here!"

How the bit timing and chipset support are structured

The repository layout tells you most of the architecture. Adafruit_NeoPixel.cpp and Adafruit_NeoPixel.h hold the core class and the per-architecture timing code. Around them sit platform-specific translation units: esp.c and esp8266.c for the Espressif parts, kendyte_k210.c for the Sipeed Maix Bit, psoc6.c, and Adafruit_Neopixel_RP2.cpp plus rp2040_pio.h for the RP2040, which uses the PIO peripheral rather than cycle-counted NOPs.

That split is deliberate and incomplete. The roadmap states the intent plainly: "For the show() function (with all the delicate pixel timing stuff), break out each architecture into separate source files rather than the current unmaintainable tangle of #ifdef statements!" So the current state is a mix. Some architectures have their own file; the rest live behind conditional compilation in the main source. The roadmap also notes that on M0 and M4 the bit timing was originally hand-tweaked NOPs, with systick adopted on M4 from version 1.4.2 and still pending for M0.

The supported list is long and worth reading before you buy hardware: AVR ATmega and ATtiny at 8, 12 and 16 MHz; Teensy 3.x and LC; Arduino Due; Arduino 101; Arm Cortex-M7/M4 parts from Renesas and ST (Arduino UNO R4, Portenta H7, Giga R1); ATSAMD21 at 48 MHz; ATSAMD51 at 120 MHz; the Adafruit STM32 Feather at 120 MHz; ESP8266 and ESP32 at any speed; WCH CH32 at 48 MHz and higher; Nordic nRF52 and nRF51; several Infineon XMC boards; and the K210. One compatibility note in the README is easy to miss: "Port A is not supported on any AVR processors at this time."

Installing Adafruit_NeoPixel and running the simple example

There are two documented install paths. The first is through the Arduino IDE's Library Manager: open Sketch > Include Library > Manage Libraries, search for the library, select a version and install. The second is manual: download the latest release from the Releases page, extract the zip, then use Sketch > Include Library > Add .ZIP Library. The README also describes a folder-based route: after downloading, rename the folder to Adafruit_NeoPixel, place it in the Arduino Libraries folder, restart the IDE, then open File->Sketchbook->Library->Adafruit_NeoPixel->strandtest.

Once installed, the minimal sketch constructs the object with the pixel count, the data pin and the colour order, then calls begin() in setup(). This is the README's Simple example, trimmed to the essentials:

cpp
#include <Adafruit_NeoPixel.h>
#define PIN        6
#define NUMPIXELS 16

Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  pixels.begin();
}

The loop then writes a colour and calls show() to push the buffer out:

cpp
void loop() {
  pixels.clear();
  for(int i=0; i<NUMPIXELS; i++) {
    pixels.setPixelColor(i, pixels.Color(0, 150, 0));
    pixels.show();
    delay(500);
  }
}

What you should see is a 16-pixel strip lighting green one pixel at a time, half a second apart. The README's version uses a DELAYVAL constant of 500 for that delay. Note the ordering: setPixelColor() only changes the in-memory buffer, and nothing reaches the strip until show() runs. That distinction matters for animation, because you can compute a whole frame and emit it once.

The README's function list is the full public surface: begin(), updateLength(), updateType(), show(), delay_ns(), setPin(), setPixelColor(), fill(), ColorHSV(), getPixelColor(), setBrightness(), getBrightness(), clear() and gamma32(). There is no built-in effect layer, no palette system and no frame scheduler.

Brightness scaling is destructive, and the roadmap says so

The most consequential limitation is documented by the maintainers themselves in the roadmap. Brightness scaling "is still a 'destructive' operation -- pixel values are altered in RAM and the original value as set can't be accurately read back, only approximated." The roadmap adds that this has been confusing and frustrating to users, and that it was done this way because NeoPixel timing is strict, particularly on AVR.

In practice this means that if you call setBrightness() and then getPixelColor(), you are reading back a scaled value, not the value you set. Code that treats the pixel buffer as the source of truth for the current frame will drift. The workaround is to keep your own colour state outside the library and re-apply it, which is more bookkeeping than the API suggests.

A second constraint is the timing budget. show() disables interrupts on some architectures for the duration of the transfer, because a missed bit corrupts the rest of the strip. The README does not quantify this, and the exact behaviour differs per chipset, but it is the reason the library is not a good fit for sketches that must service a radio or a strict timer during a frame.

A third is the API surface itself. The roadmap asks contributors not to use updateLength() or updateType() in new code, calling them a design mistake kept alive by the Prime Directive, and recommends the C++ new operator with the regular constructor instead. setPin() is described as acceptable, a trick for recycling pixel memory across multiple strips. If you are starting fresh, following that advice saves you from an API the maintainers would rather not have shipped.

Adafruit NeoPixel versus FastLED: different jobs

The comparison people search for is Adafruit_NeoPixel versus FastLED, and the difference is scope rather than quality. Adafruit_NeoPixel is a driver. It converts your buffer into the wire protocol and stops there. FastLED is a driver plus an effects and colour framework: palettes, blending, noise functions and colour temperature correction are part of its surface, and it targets a wide set of chipsets with its own timing backends.

If you want a breathing effect with a mapped palette in twenty lines, FastLED gives you primitives for that and Adafruit_NeoPixel does not. If you want a sketch that has compiled unchanged for years against a stable API, Adafruit_NeoPixel's Prime Directive is explicitly that commitment, and the roadmap states the reasoning: many sketches "are hosted elsewhere and don't track changes here, some are in print and can never be changed." That is an unusual promise in embedded libraries and it cuts both ways, since it also means the updateLength() and updateType() mistakes stay in the API.

A second alternative is writing the bit-banging yourself, which is what the library exists to prevent. For a single strip on a supported board, that is rarely worth the effort. For an unsupported MCU, a fork or a hand-written driver may be the only route, and the README points at forks for exactly that case.

Licence, releases and what maintenance costs you

Adafruit_NeoPixel is LGPL-3.0, or at your option any later version, per the README's licence section. The practical consequence is the usual one for LGPL: you can link it into a closed-source sketch, but modifications to the library itself carry obligations. This is not legal advice; if you are shipping a product with a modified copy, read COPYING and get proper counsel.

The release cadence is steady but narrow. Version 1.15.5 landed on 2026-05-12, 1.15.4 on 2026-02-11 added support for the XMC1400 2GO (KIT_XMC14_2GO), and 1.15.3 on 2026-02-03 added timing for CH32V00x running at 48 MHz or above. Those are the kinds of changes to expect: new board support and timing corrections, not API redesign. The repository is not archived, and the last push was on 2026-05-12.

Upgrade cost is therefore low for the API and non-zero for timing. The roadmap warns contributors off PRs that adjust timing "to better match the datasheet," with the reasoning that "the datasheet isn't really true to begin with." If you are pinning a version for a product, that is a reason to test a strip on real hardware after any bump rather than trusting the changelog alone. The roadmap is also explicit that its wish list has no timeline and should not be counted on: "There's No Official Timeline So Please Don't Count On Any Of This Ever Being Canonical." Treat the 400 KHz removal, the per-architecture file split and the M0 systick change as possibilities, not a plan.

Editorial conclusion

Adafruit_NeoPixel is the right choice when you have an Arduino-compatible board, a strip or ring of WS2812-style pixels, and a sketch that needs to keep compiling for years; the roadmap's Prime Directive is backward compatibility, and the last push was on 2026-05-12 with release 1.15.5. It is the wrong choice when you need parallel output across many strips, a broad effect engine, or per-pixel colour correction, because the library exposes only the functions listed in the README and leaves effects to you. Before adopting, verify that your exact chipset appears in the supported list, check whether your board's clock speed matches the timing notes for that architecture, and read the brightness-scaling caveat, since setBrightness() alters pixel values in RAM and the original value can only be approximated on read-back.

Frequently asked questions

What is Adafruit NeoPixel?

It is an Arduino library for controlling single-wire addressable LED pixels and strips, such as WS2812-style parts. It handles the bit timing and colour order so your sketch only sets pixel values and calls show().

Can I use Adafruit NeoPixel with Arduino?

Yes. The library is built for the Arduino IDE and ships with example sketches such as strandtest and simple. It supports AVR ATmega and ATtiny at 8, 12 and 16 MHz, along with many Arm, ESP and Nordic boards listed in the README.

How do I install the Adafruit NeoPixel library?

Use Sketch > Include Library > Manage Libraries in the Arduino IDE and search for the library, or download a release zip and use Sketch > Include Library > Add .ZIP Library. The README also describes renaming the folder to Adafruit_NeoPixel and placing it in the Arduino Libraries folder.

Is WS2812B the same as NeoPixel?

The README describes the library as controlling single-wire LED pixels and strips such as the Adafruit 60 LED/meter Digital LED strip, and the sketch constructor uses a colour order and rate constant like NEO_GRB + NEO_KHZ800. It does not state a formal equivalence between the WS2812B part and the NeoPixel name.

What is the difference between Adafruit NeoPixel and FastLED?

Adafruit_NeoPixel is a driver: it converts a pixel buffer into the wire protocol and exposes functions such as setPixelColor(), show() and fill(). FastLED is not discussed in this repository's README, so its feature set cannot be compared from this material.

Official sources

  1. adafruit/Adafruit_NeoPixel on GitHub
  2. Issues
  3. License: LGPL-3.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/adafruit-adafruit-neopixel.svg)](https://hysenlabs.com/projects/adafruit-adafruit-neopixel)