From fa3687e62a99c36a0452546b77e3bc06c600a338 Mon Sep 17 00:00:00 2001 From: stnkl Date: Sat, 2 Jul 2022 21:47:42 +0200 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index de4987d..19e5b7d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ FastLEDHub allows you to manage all of your [FastLED]([FastLED](https://github.c - Alarm: Be woken up to an animation slowly fading in - Sunset: Automatically fade in an animation when the sun sets at your location - Control animations and brightness using hardware inputs +- Incorporate audio spectrum data into your animations - Control animations using HTTP requests for easy automation ## Demo @@ -217,6 +218,17 @@ Setting up an alarm in the web interface will fade in a user defined animation o Similarly the sunset feature will fade in an animation as soon as the sun sets at your location. Please configure latitude, longitude and time zone in the web interface beforehand. +### Audio spectrum data + +[FastLEDHub-AudioViz](https://github.com/stnkl/FastLEDHub_AudioViz) allows you to send audio spectrum data from a Windows audio device to your ESP32/ESP8266. The transmitted data consists of 16 bins corresponding to different frequency ranges in the audio spectrum. Data is transmitted via a websocket connection and can be used by accessing the `FastLEDHub.spectrumData` array from within your animation: + +```cpp +uint8_t lowFrequencies = FastLEDHub.spectrumData[0]; +uint8_t highFrequencies = FastLEDHub.spectrumData[SPECTRUM_LENGTH - 1]; +``` + +`SPECTRUM_LENGTH` defines the number of bins (16). The `Spectrogram` example shows one way to use the spectrum data in your animations. + ### Control via HTTP requests Most functions can be triggered via HTTP requests: