Fixes #457
This workaround, compared to the old implementation of throwing an exception,
is simpler, makes the compiled program 260 smaller, and unbreaks existing code
that uses a pixel count of 1 that used to work prior to 2cce77e9 (v2.6.2).
This fix basically does the same thing as the recommended fix on the caller
side, except without bothering the caller. It does make `.GetPixelCount()`
return 2 instead of the provided number of pixels, but the resulting program is
arguably less broken than it is with the failing check at construction, and not
likely to really be much of an issue anyway.
NeoPixelBus
Arduino NeoPixel library
A library to control one wire protocol RGB and RGBW leds like APA106, SK6812, WS2811, WS2812 and WS2813 that are commonly refered to as NeoPixels and two wire protocol RGB like Lpd8806, APA102 and SK9822 commonly refered to as DotStars. Supports most Arduino platforms.
Please read this best practices link before connecting your NeoPixels, it will save you a lot of time and effort.
Adafruit NeoPixel Best Practices
For quick questions and support:
- Try the new Github Discussions
- Discord NeoPixelBus Invitation or if you are already a member of Discord Server NeoPixelBus
- Or jump on Gitter
For bugs, make sure there isn't an active issue and then create one.
Why this library and not FastLED or some other library?
See Why this Library in the Wiki.
Documentation
Installing This Library (prefered, you just want to use it)
Open the Library Manager and search for "NeoPixelBus by Makuna" and install
Installing This Library From GitHub (advanced, you want to contribute)
Create a directory in your Arduino\Library folder named "NeoPixelBus"
Clone (Git) this project into that folder.
It should now show up in the import list when you restart Arduino IDE.