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

Detailed Description

Demonstrates playing a video on FastLED.

Author
Zach Vorhies

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
  4. When the compiler is done a web page will open.

Definition in file SdCard.ino.

#include "FastLED.h"
#include "Arduino.h"
#include "fx/2d/noisepalette.h"
#include "fx/fx_engine.h"
#include "fx/video.h"
#include "fl/file_system.h"
#include "fl/ui.h"
#include "fl/screenmap.h"

Go to the source code of this file.

Macros

#define LED_PIN   2
 
#define LED_TYPE   WS2811
 
#define COLOR_ORDER   GRB
 
#define FPS   60
 
#define CHIP_SELECT_PIN   5
 
#define MATRIX_WIDTH   32
 
#define MATRIX_HEIGHT   32
 
#define NUM_VIDEO_FRAMES   2
 
#define NUM_LEDS   (MATRIX_WIDTH * MATRIX_HEIGHT)
 
#define IS_SERPINTINE   true
 

Functions

void setup ()
 
void loop ()
 

Variables

Title title ("SDCard Demo - Mapped Video")
 
Description description ("Video data is streamed off of a SD card and displayed on a LED strip. The video data is mapped to the LED strip using a ScreenMap.")
 
CRGB leds [NUM_LEDS]
 
ScreenMap screenMap
 
FileSystem filesystem
 
Video video
 
Video video2
 
Slider videoSpeed ("Video Speed", 1.0f, -1, 2.0f, 0.01f)
 
NumberField whichVideo ("Which Video", 0, 0, 1)
 
bool gError = false
 

Macro Definition Documentation

◆ CHIP_SELECT_PIN

#define CHIP_SELECT_PIN   5

Definition at line 42 of file SdCard.ino.

◆ COLOR_ORDER

#define COLOR_ORDER   GRB

Definition at line 40 of file SdCard.ino.

◆ FPS

#define FPS   60

Definition at line 41 of file SdCard.ino.

◆ IS_SERPINTINE

#define IS_SERPINTINE   true

Definition at line 52 of file SdCard.ino.

◆ LED_PIN

#define LED_PIN   2

Definition at line 38 of file SdCard.ino.

◆ LED_TYPE

#define LED_TYPE   WS2811

Definition at line 39 of file SdCard.ino.

◆ MATRIX_HEIGHT

#define MATRIX_HEIGHT   32

Definition at line 47 of file SdCard.ino.

◆ MATRIX_WIDTH

#define MATRIX_WIDTH   32

Definition at line 46 of file SdCard.ino.

◆ NUM_LEDS

#define NUM_LEDS   (MATRIX_WIDTH * MATRIX_HEIGHT)

Definition at line 51 of file SdCard.ino.

◆ NUM_VIDEO_FRAMES

#define NUM_VIDEO_FRAMES   2

Definition at line 48 of file SdCard.ino.

Function Documentation

◆ loop()

void loop ( )

Definition at line 111 of file SdCard.ino.

◆ setup()

void setup ( )

Definition at line 72 of file SdCard.ino.

Variable Documentation

◆ filesystem

FileSystem filesystem

Definition at line 62 of file SdCard.ino.

◆ gError

bool gError = false

Definition at line 70 of file SdCard.ino.

◆ leds

CRGB leds[NUM_LEDS]

Definition at line 59 of file SdCard.ino.

◆ screenMap

ScreenMap screenMap

Definition at line 60 of file SdCard.ino.

◆ video

Video video

Definition at line 63 of file SdCard.ino.

◆ video2

Video video2

Definition at line 64 of file SdCard.ino.