I'm doing a back lighting thing for a project. I want some LED's flickering, which I have working fine, however.
I'm wondering, since amber LED strip at 5v is apparently a unicorn, whether I can use another pin and output just a static colour on that second strip?
Below is what I'm currently using, and given the LED pin can be defined, I'm assuming I could add something to this as a second pin.
Basically, I'm a coding moron and have no idea what I'm doing here. Is it possible?
#include <FastLED.h>
#define LED_PIN 6
#define NUM_LEDS 57
#define BRIGHTNESS 255
#define LED_TYPE WS2812
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 100
CRGBPalette16 currentPalette;
TBlendType currentBlending;
extern CRGBPalette16 LavaColors;
extern const TProgmemPalette16 LavaColors_p PROGMEM;
void setup() {
delay( 3000 ); // power-up safety delay
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );
currentPalette = LavaColors_p;
currentBlending = LINEARBLEND;
}
void loop()
{
static uint8_t startIndex = 0;
startIndex = startIndex + 1; /* motion speed */
FillLEDsFromPaletteColors( startIndex);
FastLED.show();
FastLED.delay(1000 / UPDATES_PER_SECOND);
}
void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
uint8_t brightness = 255;
for( int i = 0; i < NUM_LEDS; i++) {
leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
colorIndex += 3;
}
}
// There are several different palettes of colors demonstrated here.
//
// FastLED provides several 'preset' palettes: RainbowColors_p, RainbowStripeColors_p,
// OceanColors_p, CloudColors_p, LavaColors_p, ForestColors_p, and PartyColors_p.