I'm trying to use the Adafruit_Neopixel fill() function to light two separate segments of the Neopixel strip. It looks like I'm doing something wrong with the color input. The first line should fill the pixels from 1 -10 with Red. The second line should fill the pixels from 20 to the end (129) with blue.
The second fill command is working but not the first. Can someone tell me the correct syntax?
#include <Adafruit_NeoPixel.h>
#define LED_COUNT 129
#define LED_PIN A4
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
}
void loop() {
strip.fill((255, 0, 0), 1, 10);
strip.fill((0, 0, 255), 20);
strip.show(); // Send the updated pixel colors to the hardware.
}
I see the documentation for the fill() function at https://learn.adafruit.com/adafruit-neo ... ibrary-use. It's not clear on how to input the color. I think because the syntax of the color input on the first is wrong, its interpreting it as no color or blank.