- Fri Nov 09, 2018 11:06 am
#200932
Hi I just got a bunch of 12999 and they seem to work fine with the Adafruit Neopixel library with one exception. When I send it an RGB value, the R and G values seem to be reversed.
Any idea what might be going wrong here? The code below should be turning my two LEDs Red, but instead they are turning green. If I use the color value 0,255,0 I get two red LEDs.
Any idea what might be going wrong here? The code below should be turning my two LEDs Red, but instead they are turning green. If I use the color value 0,255,0 I get two red LEDs.
Code: Select all
#include "Adafruit_NeoPixel.h"
Adafruit_NeoPixel pixels_4(2, 4);
int max_leds = 2;
void setup()
{
pixels_4.begin();
pixels_4.show();
}
void loop()
{
for(int x = 0; x< max_leds; x++){
pixels_4.setPixelColor(x, 255, 0, 0);
};
pixels_4.show();
delay(100);
}