Budurasmala Project Arduino
Budurasmala Project Arduino
Budurasmala Project Arduino
h>
#define LED_PIN 3
#define NUM_LEDS 60
#define BRIGHTNESS 25
CRGB leds[NUM_LEDS];
// This example shows several ways to set up and use 'palettes' of colors
// with FastLED.
//
//
// run this sketch, and watch the pretty lights as you then read through
// the code. Although this sketch has eight (or more) different color schemes,
//
//
TBlendType currentBlending;
void setup() {
FastLED.setBrightness( BRIGHTNESS );
currentPalette = RainbowColors_p;
currentBlending = LINEARBLEND;
void loop()
ChangePalettePeriodically();
FillLEDsFromPaletteColors( startIndex);
FastLED.show();
FastLED.delay(1000 / UPDATES_PER_SECOND);
colorIndex += 3;
//
//
// Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly. All are shown here.
void ChangePalettePeriodically()
lastSecond = secondHand;
if( secondHand == 0) { currentPalette = RainbowColors_p; currentBlending = LINEARBLEND; }
void SetupTotallyRandomPalette()
void SetupBlackAndWhiteStripedPalette()
{
currentPalette[0] = CRGB::White;
currentPalette[4] = CRGB::White;
currentPalette[8] = CRGB::White;
currentPalette[12] = CRGB::White;
void SetupPurpleAndGreenPalette()
currentPalette = CRGBPalette16(
CRGB::Red,
CRGB::Blue,
CRGB::Black,
CRGB::Red,
CRGB::Gray,
CRGB::Blue,
CRGB::Black,
CRGB::Red,
CRGB::Red,
CRGB::Gray,
CRGB::Gray,
CRGB::Blue,
CRGB::Blue,
CRGB::Black,
CRGB::Black
};
//
// has 256 entries, each containing a specific 24-bit RGB color. You can then
// index into the color palette using a simple 8-bit (one byte) value.
//
//
//
// So for example, if you set the first two explicit entries of a compact
// the first sixteen entries from the virtual palette (of 256), you'd get