Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
LEDOutput Class Reference

#include <LEDOutput.h>

Public Member Functions

 LEDOutput (AudioFFTBase &fft)
 Default Constructor. More...
 LEDOutput (VolumePrint &vol)
void addEmptyColumn ()
 Adds an empty column to the end shifting the content to the left.
bool begin (LEDOutputConfig config)
 Setup Led matrix.
LEDOutputConfigconfig ()
LEDOutputConfig defaultConfig ()
 Provides the default config object.
virtual float getMagnitude (int x)
virtual float getMaxMagnitude ()
 Provodes the max magnitude.
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.
virtual void update ()
 Updates the display: call this method in your loop.
void updateColumn (int currY)
 Update the last column with the indicated bar.
void updateColumn (int x, int currY)
 Update the indicated column with the indicated bar.

Protected Member Functions

uint16_t xy (uint8_t x, uint8_t y)

Static Protected Member Functions

static void fftCallback (AudioFFTBase &fft)
 callback method which provides updated data from fft

Protected Attributes

LEDOutputConfig cfg
uint64_t count = 0
Vector< CRGB > leds {0}
Vector< float > magnitudes {0}
CRGB not_valid
AudioFFTBasep_fft = nullptr
VolumePrintp_vol = nullptr


class AudioFFTBase

Detailed Description

LEDOutput using the FastLED library. You write the data to the FFT Stream. This displays the result of the FFT to a LED matrix.

Phil Schatzmann

Constructor & Destructor Documentation

◆ LEDOutput()

LEDOutput ( AudioFFTBase fft)

Default Constructor.


Member Function Documentation

◆ config()

LEDOutputConfig& config ( )

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

◆ getMagnitude()

virtual float getMagnitude ( int  x)

Returns the magnitude for the indicated led x position. We might need to combine values from the magnitudes array if this is much bigger.

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