FastLED 3.9.3
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)
 
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 21 of file Noise.ino.

◆ NUM_LEDS

#define NUM_LEDS   (kMatrixWidth * kMatrixHeight)

Definition at line 22 of file Noise.ino.

Function Documentation

◆ fillnoise8()

void fillnoise8 ( )

Definition at line 94 of file Noise.ino.

◆ loop()

void loop ( )

Definition at line 106 of file Noise.ino.

◆ setup()

void setup ( )

Definition at line 79 of file Noise.ino.

◆ XY()

uint16_t XY ( uint8_t x,
uint8_t y )

Definition at line 28 of file Noise.ino.

Variable Documentation

◆ kMatrixHeight

const uint8_t kMatrixHeight = 16

Definition at line 18 of file Noise.ino.

◆ kMatrixSerpentineLayout

const bool kMatrixSerpentineLayout = true

Definition at line 25 of file Noise.ino.

◆ kMatrixWidth

const uint8_t kMatrixWidth = 16

Definition at line 17 of file Noise.ino.

◆ leds

CRGB leds[kMatrixWidth *kMatrixHeight]

Definition at line 51 of file Noise.ino.

◆ noise

uint16_t noise[MAX_DIMENSION][MAX_DIMENSION]

Definition at line 77 of file Noise.ino.

◆ scale

uint16_t scale = 311

Definition at line 74 of file Noise.ino.

◆ speed

uint16_t speed = 20

Definition at line 63 of file Noise.ino.