FastLED 3.9.7
|
Demonstrates how to mix noise generation with color palettes on a 2D LED matrix.
Definition in file NoisePlusPalette.ino.
#include <FastLED.h>
Go to the source code of this file.
Macros | |
#define | LED_PIN 3 |
#define | BRIGHTNESS 96 |
#define | LED_TYPE WS2811 |
#define | COLOR_ORDER GRB |
#define | NUM_LEDS (kMatrixWidth * kMatrixHeight) |
#define | MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight) |
#define | HOLD_PALETTES_X_TIMES_AS_LONG 1 |
Functions | |
void | SetupRandomPalette () |
void | SetupPurpleAndGreenPalette () |
void | SetupBlackAndWhiteStripedPalette () |
void | ChangePaletteAndSettingsPeriodically () |
void | mapNoiseToLEDsUsingPalette () |
uint16_t | XY (uint8_t x, uint8_t y) |
void | setup () |
void | fillnoise8 () |
void | loop () |
Variables | |
const uint8_t | kMatrixWidth = 16 |
const uint8_t | kMatrixHeight = 16 |
const bool | kMatrixSerpentineLayout = true |
CRGB | leds [kMatrixWidth *kMatrixHeight] |
uint16_t | speed = 20 |
uint16_t | scale = 30 |
uint8_t | noise [MAX_DIMENSION][MAX_DIMENSION] |
CRGBPalette16 | currentPalette (PartyColors_p) |
uint8_t | colorLoop = 1 |
#define BRIGHTNESS 96 |
Definition at line 14 of file NoisePlusPalette.ino.
#define COLOR_ORDER GRB |
Definition at line 16 of file NoisePlusPalette.ino.
#define HOLD_PALETTES_X_TIMES_AS_LONG 1 |
Definition at line 210 of file NoisePlusPalette.ino.
#define LED_PIN 3 |
Definition at line 13 of file NoisePlusPalette.ino.
#define LED_TYPE WS2811 |
Definition at line 15 of file NoisePlusPalette.ino.
#define MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight) |
Definition at line 53 of file NoisePlusPalette.ino.
#define NUM_LEDS (kMatrixWidth * kMatrixHeight) |
Definition at line 52 of file NoisePlusPalette.ino.
void ChangePaletteAndSettingsPeriodically | ( | ) |
Definition at line 212 of file NoisePlusPalette.ino.
void fillnoise8 | ( | ) |
Definition at line 107 of file NoisePlusPalette.ino.
void loop | ( | ) |
Definition at line 182 of file NoisePlusPalette.ino.
void mapNoiseToLEDsUsingPalette | ( | ) |
Definition at line 148 of file NoisePlusPalette.ino.
void setup | ( | ) |
Definition at line 93 of file NoisePlusPalette.ino.
void SetupBlackAndWhiteStripedPalette | ( | ) |
Definition at line 255 of file NoisePlusPalette.ino.
void SetupPurpleAndGreenPalette | ( | ) |
Definition at line 268 of file NoisePlusPalette.ino.
void SetupRandomPalette | ( | ) |
Definition at line 241 of file NoisePlusPalette.ino.
uint16_t XY | ( | uint8_t | x, |
uint8_t | y ) |
Definition at line 285 of file NoisePlusPalette.ino.
uint8_t colorLoop = 1 |
Definition at line 79 of file NoisePlusPalette.ino.
const uint8_t kMatrixHeight = 16 |
Definition at line 20 of file NoisePlusPalette.ino.
const bool kMatrixSerpentineLayout = true |
Definition at line 23 of file NoisePlusPalette.ino.
const uint8_t kMatrixWidth = 16 |
Definition at line 19 of file NoisePlusPalette.ino.
CRGB leds[kMatrixWidth *kMatrixHeight] |
Definition at line 56 of file NoisePlusPalette.ino.
uint8_t noise[MAX_DIMENSION][MAX_DIMENSION] |
Definition at line 76 of file NoisePlusPalette.ino.
uint16_t scale = 30 |
Definition at line 73 of file NoisePlusPalette.ino.
uint16_t speed = 20 |
Definition at line 67 of file NoisePlusPalette.ino.