arduino-audio-tools
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
LEDOutput Class Reference

LED output using the FastLED library. More...

#include <LEDOutput.h>

Public Member Functions

 LEDOutput ()=default
 Default Constructor.
 
 LEDOutput (FFTDisplay &fft)
 Constructor for FFT scenario. More...
 
 LEDOutput (VolumeMeter &vol)
 Constructor for VolumeMeter scenario. More...
 
void addColumnBar (int currY)
 Update the last column with the indicated bar.
 
bool begin (LEDOutputConfig config)
 Setup Led matrix.
 
LEDOutputConfigconfig ()
 Provides access to the actual config object. E.g. to change the update logic.
 
LEDOutputConfig defaultConfig ()
 Provides the default config object.
 
void display ()
 Update the led_matrix (calling FastLED.show();.
 
FFTDisplayfftDisplay ()
 Provides acces to the FFTDisplay object.
 
virtual float getMaxMagnitude ()
 Provodes the max magnitude for both the.
 
CRGB & led (uint8_t index)
 Determine the led with the help of the index pos.
 
int ledCount ()
 Provides the number of LEDs: call begin() first!
 
CRGB * ledData ()
 Provides the address fo the CRGB array: call begin() first!
 
CRGB & ledXY (uint8_t x, uint8_t y)
 Determine the led with the help of the x and y pos.
 
void setColumnBar (int currY)
 Update the last column with the indicated bar.
 
void setColumnBar (int x, int currY)
 Update the indicated column with the indicated bar.
 
virtual void update ()
 Updates the display: call this method in your loop.
 

Protected Member Functions

void addEmptyColumn ()
 Adds an empty column to the end shifting the content to the left.
 
uint16_t xy (uint8_t x, uint8_t y)
 

Protected Attributes

LEDOutputConfig cfg
 
uint64_t count = 0
 
Vector< CRGB > leds {0}
 
int max_column = -1
 
CRGB not_valid
 
FFTDisplayp_fft = nullptr
 
VolumeMeterp_vol = nullptr
 

Friends

class AudioFFTBase
 

Detailed Description

LED output using the FastLED library.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ LEDOutput() [1/2]

LEDOutput ( FFTDisplay fft)
inline

Constructor for FFT scenario.

Parameters
fft

◆ LEDOutput() [2/2]

LEDOutput ( VolumeMeter vol)
inline

Constructor for VolumeMeter scenario.

Parameters
vol

The documentation for this class was generated from the following file: