Hey everyone,
Recently, I’ve been working on a lot of FastLED projects on Adafruit DotStars, and the library has worked really well (I love the HSV support). However, I recently embarked on a project using:
- Adafruit Gemma V2 (Adafruit GEMMA v2 - Miniature wearable electronic platform : ID 1222 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
- FastLED 3.0.3
- 16 Neopixel Ring (NeoPixel Ring - 16 x 5050 RGB LED with Integrated Drivers : ID 1463 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits)
However, despite my efforts the LED’s always show up in all-white, full brightness with no animations. Here is some sample code:
#include <FastLED.h>
#define NUM_LEDS 16
#define DATA_PIN 0
CRGB leds[NUM_LEDS];
void setup() {
pinMode(1, OUTPUT);
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
// Turn the first led red for 1 second
leds[0] = CRGB::Red;
FastLED.show();
delay(1000);
digitalWrite(1, HIGH);
// Set the first led back to black for 1 second
leds[0] = CRGB::Black;
FastLED.show();
delay(1000);
digitalWrite(1, LOW);
}
In this case, all 16 lights turn on white, full brightness. No red, no animation on the first LED. Since you can’t do serial communication, I have the built in LED on the Gemma flashing in the loop code - this still works successfully, so the code works. Also, if I change the number of LED’s in the addLED’s call, it only lights up the corresponding number. Also tried setting NEOPIXEL to WS2812B, but looked at FastLED.h and saw that they all lead to the same controller anyways.
Even weirder - the Adafruit Neopixel Library works just fine - but sadly misses out on all of the sweet features of FastLED.
I’m pretty stumped at this point, am I missing something?