|
| FastLED_NeoPixel_Variant (CRGB *ledPtr, uint16_t nLeds) |
|
void | begin (CLEDController &ctrl) |
|
void | show () |
|
void | setPixelColor (uint16_t n, uint8_t r, uint8_t g, uint8_t b) |
|
void | setPixelColor (uint16_t n, uint8_t r, uint8_t g, uint8_t b, uint8_t w) |
|
void | setPixelColor (uint16_t n, uint32_t c) |
|
void | fill (uint32_t c=0, uint16_t first=0, uint16_t count=0) |
|
void | setBrightness (uint8_t bright) |
|
void | clear () |
|
void | updateLength (uint16_t n) |
|
bool | canShow () |
|
uint8_t * | getPixels () const |
|
uint8_t | getBrightness () const |
|
uint16_t | numPixels () const |
|
uint32_t | getPixelColor (uint16_t n) const |
|
CRGB * | getLeds () const |
|
CLEDController * | getController () const |
|
void | setBlendWhite (bool blend) |
|
void | setPin (uint16_t p) |
|
void | updateType (neoPixelType T) |
|
FastLED implementation of the Adafruit_NeoPixel class. Base class for all strips.
This provides a wrapper for the FastLED LED data that mimic the structure of the Adafruit_NeoPixel class. This lets you use an Adafruit_NeoPixel animation with FastLED without having to rewrite it.
This class can be used with any FastLED strip type. The LED data array must be defined externally and linked in the constructor along with the strip size (number of LEDs).
You must also call begin() before data will be sent to the strip. The begin() function takes a reference to the CLEDController returned by the FastLED.addLeds() function.
- See also
- Adafruit_NeoPixel
-
New Functions
-
Unimplemented Functions
- Examples
- StripVariant.ino.
This function assigns a CLEDController instance, used for sending the LED data to the strip, to the internal controller pointer. This must be done before any LED data can be written.
To obtain a CLEDController object, call the FastLED.addLeds() function using the relevant template parameters (strip type, data pin(s), and RGB color order) and function parameters (CRGB array pointer and number of LEDs in the strip). E.g.:
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
The addLeds function returns a reference to a static instance of a CLEDController object. The addLeds call can be used directly as an argument for the begin() function.
This is purposefully not done through the constructor to avoid a static initialization order fiasco, as the "FastLED" instance (CFastLED class) that contains the linked list of controllers exists in a separate compilation unit from the main Arduino .ino file.
- Parameters
-
ctrl | reference to assign to the internal controller pointer |
- See also
- Adafruit_NeoPixel::begin()