arduino-audio-tools
Loading...
Searching...
No Matches
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.
 
 LEDOutput (VolumeMeter &vol)
 Constructor for VolumeMeter scenario.
 
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.
 
CRGBled (uint8_t index)
 Determine the led with the help of the index pos.
 
int ledCount ()
 Provides the number of LEDs: call begin() first!
 
CRGBledData ()
 Provides the address fo the CRGB array: call begin() first!
 
CRGBledXY (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< CRGBleds {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/3]

LEDOutput ( )
default

Default Constructor.

◆ LEDOutput() [2/3]

LEDOutput ( FFTDisplay fft)
inline

Constructor for FFT scenario.

Parameters
fft

◆ LEDOutput() [3/3]

LEDOutput ( VolumeMeter vol)
inline

Constructor for VolumeMeter scenario.

Parameters
vol

Member Function Documentation

◆ addColumnBar()

void addColumnBar ( int  currY)
inline

Update the last column with the indicated bar.

◆ addEmptyColumn()

void addEmptyColumn ( )
inlineprotected

Adds an empty column to the end shifting the content to the left.

◆ begin()

bool begin ( LEDOutputConfig  config)
inline

Setup Led matrix.

◆ config()

LEDOutputConfig & config ( )
inline

Provides access to the actual config object. E.g. to change the update logic.

◆ defaultConfig()

LEDOutputConfig defaultConfig ( )
inline

Provides the default config object.

◆ display()

void display ( )
inline

Update the led_matrix (calling FastLED.show();.

◆ fftDisplay()

FFTDisplay & fftDisplay ( )
inline

Provides acces to the FFTDisplay object.

◆ getMaxMagnitude()

virtual float getMaxMagnitude ( )
inlinevirtual

Provodes the max magnitude for both the.

◆ led()

CRGB & led ( uint8_t  index)
inline

Determine the led with the help of the index pos.

◆ ledCount()

int ledCount ( )
inline

Provides the number of LEDs: call begin() first!

◆ ledData()

CRGB * ledData ( )
inline

Provides the address fo the CRGB array: call begin() first!

◆ ledXY()

CRGB & ledXY ( uint8_t  x,
uint8_t  y 
)
inline

Determine the led with the help of the x and y pos.

◆ setColumnBar() [1/2]

void setColumnBar ( int  currY)
inline

Update the last column with the indicated bar.

◆ setColumnBar() [2/2]

void setColumnBar ( int  x,
int  currY 
)
inline

Update the indicated column with the indicated bar.

◆ update()

virtual void update ( )
inlinevirtual

Updates the display: call this method in your loop.

◆ xy()

uint16_t xy ( uint8_t  x,
uint8_t  y 
)
inlineprotected

Friends And Related Symbol Documentation

◆ AudioFFTBase

Member Data Documentation

◆ cfg

LEDOutputConfig cfg
protected

◆ count

uint64_t count = 0
protected

◆ leds

Vector<CRGB> leds {0}
protected

◆ max_column

int max_column = -1
protected

◆ not_valid

CRGB not_valid
protected

◆ p_fft

FFTDisplay* p_fft = nullptr
protected

◆ p_vol

VolumeMeter* p_vol = nullptr
protected

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