FastLED 3.9.7
Loading...
Searching...
No Matches
XYMatrix.ino File Reference

Detailed Description

Demonstrates how to use an XY position helper function with a 2D matrix.

Definition in file XYMatrix.ino.

#include <FastLED.h>

Go to the source code of this file.

Macros

#define LED_PIN   3
 
#define COLOR_ORDER   GRB
 
#define CHIPSET   WS2811
 
#define BRIGHTNESS   64
 
#define NUM_LEDS   (kMatrixWidth * kMatrixHeight)
 

Functions

uint16_t XY (uint8_t x, uint8_t y)
 
CRGB *const leds (leds_plus_safety_pixel+1)
 
uint16_t XYsafe (uint8_t x, uint8_t y)
 
void DrawOneFrame (uint8_t startHue8, int8_t yHueDelta8, int8_t xHueDelta8)
 
void setup ()
 
void loop ()
 

Variables

const uint8_t kMatrixWidth = 16
 
const uint8_t kMatrixHeight = 16
 
const bool kMatrixSerpentineLayout = true
 
const bool kMatrixVertical = false
 
CRGB leds_plus_safety_pixel [NUM_LEDS+1]
 

Macro Definition Documentation

◆ BRIGHTNESS

#define BRIGHTNESS   64

Definition at line 12 of file XYMatrix.ino.

◆ CHIPSET

#define CHIPSET   WS2811

Definition at line 10 of file XYMatrix.ino.

◆ COLOR_ORDER

#define COLOR_ORDER   GRB

Definition at line 9 of file XYMatrix.ino.

◆ LED_PIN

#define LED_PIN   3

Definition at line 7 of file XYMatrix.ino.

◆ NUM_LEDS

#define NUM_LEDS   (kMatrixWidth * kMatrixHeight)

Definition at line 169 of file XYMatrix.ino.

Function Documentation

◆ DrawOneFrame()

void DrawOneFrame ( uint8_t startHue8,
int8_t yHueDelta8,
int8_t xHueDelta8 )

Definition at line 181 of file XYMatrix.ino.

◆ loop()

void loop ( )

Definition at line 203 of file XYMatrix.ino.

◆ setup()

void setup ( )

Definition at line 195 of file XYMatrix.ino.

◆ XY()

uint16_t XY ( uint8_t x,
uint8_t y )

Definition at line 92 of file XYMatrix.ino.

◆ XYsafe()

uint16_t XYsafe ( uint8_t x,
uint8_t y )

Definition at line 173 of file XYMatrix.ino.

Variable Documentation

◆ kMatrixHeight

const uint8_t kMatrixHeight = 16

Definition at line 33 of file XYMatrix.ino.

◆ kMatrixSerpentineLayout

const bool kMatrixSerpentineLayout = true

Definition at line 36 of file XYMatrix.ino.

◆ kMatrixVertical

const bool kMatrixVertical = false

Definition at line 37 of file XYMatrix.ino.

◆ kMatrixWidth

const uint8_t kMatrixWidth = 16

Definition at line 32 of file XYMatrix.ino.

◆ leds_plus_safety_pixel

CRGB leds_plus_safety_pixel[NUM_LEDS+1]

Definition at line 170 of file XYMatrix.ino.