FastLED 3.7.8
Loading...
Searching...
No Matches
Noise.ino File Reference

Detailed Description

Demonstrates how to use noise generation on a 2D LED matrix.

Definition in file Noise.ino.

#include <FastLED.h>

Go to the source code of this file.

Macros

#define MAX_DIMENSION   ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight)
 
#define NUM_LEDS   (kMatrixWidth * kMatrixHeight)
 

Functions

uint16_t XY (uint8_t x, uint8_t y)
 Forward declaration of the function "XY" which must be provided by the application for use in two-dimensional filter functions.
 
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 = 311
 
uint16_t noise [MAX_DIMENSION][MAX_DIMENSION]
 

Macro Definition Documentation

◆ MAX_DIMENSION

#define MAX_DIMENSION   ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight)

Definition at line 15 of file Noise.ino.

◆ NUM_LEDS

#define NUM_LEDS   (kMatrixWidth * kMatrixHeight)

Definition at line 16 of file Noise.ino.

Function Documentation

◆ fillnoise8()

void fillnoise8 ( )

Definition at line 88 of file Noise.ino.

◆ loop()

void loop ( )

Definition at line 100 of file Noise.ino.

◆ setup()

void setup ( )

Definition at line 73 of file Noise.ino.

◆ XY()

uint16_t XY ( uint8_t x,
uint8_t y )

Forward declaration of the function "XY" which must be provided by the application for use in two-dimensional filter functions.

Definition at line 22 of file Noise.ino.

Variable Documentation

◆ kMatrixHeight

const uint8_t kMatrixHeight = 16

Definition at line 13 of file Noise.ino.

◆ kMatrixSerpentineLayout

const bool kMatrixSerpentineLayout = true

Definition at line 19 of file Noise.ino.

◆ kMatrixWidth

const uint8_t kMatrixWidth = 16

Definition at line 12 of file Noise.ino.

◆ leds

CRGB leds[kMatrixWidth *kMatrixHeight]

Definition at line 45 of file Noise.ino.

◆ noise

uint16_t noise[MAX_DIMENSION][MAX_DIMENSION]

Definition at line 71 of file Noise.ino.

◆ scale

uint16_t scale = 311

Definition at line 68 of file Noise.ino.

◆ speed

uint16_t speed = 20

Definition at line 57 of file Noise.ino.