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

Detailed Description

Demonstrates Stefan Petricks Animartrix effects.

Author
Stefan Petrick
Zach Vorhies (FastLED adaptation)

This sketch is fully compatible with the FastLED web compiler. To use it do the following:

  1. Install Fastled: pip install fastled
  2. cd into this examples page.
  3. Run the FastLED web compiler at root: fastled

Definition in file Animartrix.ino.

#include <stdio.h>
#include <string>
#include <FastLED.h>
#include "fl/json.h"
#include "fl/slice.h"
#include "fx/fx_engine.h"
#include "fx/2d/animartrix.hpp"
#include "fl/ui.h"

Go to the source code of this file.

Macros

#define LED_PIN   3
 
#define BRIGHTNESS   96
 
#define COLOR_ORDER   GRB
 
#define MATRIX_WIDTH   22
 
#define MATRIX_HEIGHT   22
 
#define NUM_LEDS   (MATRIX_WIDTH * MATRIX_HEIGHT)
 
#define FIRST_ANIMATION   POLAR_WAVES
 

Functions

void setup ()
 
void loop ()
 

Variables

CRGB leds [NUM_LEDS]
 
XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT)
 
Title title ("Animartrix")
 
Description description ("Demo of the Animatrix effects. @author of fx is StefanPetrick")
 
Slider brightness ("Brightness", 255, 0, 255)
 
NumberField fxIndex ("Animartrix - index", 0, 0, NUM_ANIMATIONS - 1)
 
Slider timeSpeed ("Time Speed", 1, -10, 10,.1)
 
Animartrix animartrix (xyMap, FIRST_ANIMATION)
 
FxEngine fxEngine (NUM_LEDS)
 

Macro Definition Documentation

◆ BRIGHTNESS

#define BRIGHTNESS   96

Definition at line 27 of file Animartrix.ino.

◆ COLOR_ORDER

#define COLOR_ORDER   GRB

Definition at line 28 of file Animartrix.ino.

◆ FIRST_ANIMATION

#define FIRST_ANIMATION   POLAR_WAVES

Definition at line 35 of file Animartrix.ino.

◆ LED_PIN

#define LED_PIN   3

Definition at line 26 of file Animartrix.ino.

◆ MATRIX_HEIGHT

#define MATRIX_HEIGHT   22

Definition at line 31 of file Animartrix.ino.

◆ MATRIX_WIDTH

#define MATRIX_WIDTH   22

Definition at line 30 of file Animartrix.ino.

◆ NUM_LEDS

#define NUM_LEDS   (MATRIX_WIDTH * MATRIX_HEIGHT)

Definition at line 33 of file Animartrix.ino.

Function Documentation

◆ loop()

void loop ( )

Definition at line 60 of file Animartrix.ino.

◆ setup()

void setup ( )

Definition at line 52 of file Animartrix.ino.

Variable Documentation

◆ leds

CRGB leds[NUM_LEDS]

Definition at line 38 of file Animartrix.ino.

◆ xyMap

XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT)

Definition at line 39 of file Animartrix.ino.