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

Detailed Description

Creates an impressive LED light show to music input on the Teensy.

Definition in file PJRCSpectrumAnalyzer.ino.

#include <OctoWS2811.h>
#include <FastLED.h>
#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>

Go to the source code of this file.

Functions

AudioInputAnalog adc1 (A3)
 
AudioConnection patchCord1 (adc1, fft)
 
void setup ()
 
unsigned int xy (unsigned int x, unsigned int y)
 
void loop ()
 
void computeVerticalLevels ()
 

Variables

const unsigned int matrix_width = 60
 
const unsigned int matrix_height = 32
 
const unsigned int myColor = 0x400020
 
const float maxLevel = 0.5
 
const float dynamicRange = 40.0
 
const float linearBlend = 0.3
 
CRGB leds [matrix_width *matrix_height]
 
AudioAnalyzeFFT1024 fft
 
float thresholdVertical [matrix_height]
 
int frequencyBinsHorizontal [matrix_width]
 

Macro Definition Documentation

◆ USE_OCTOWS2811

#define USE_OCTOWS2811

Definition at line 18 of file PJRCSpectrumAnalyzer.ino.

Function Documentation

◆ computeVerticalLevels()

void computeVerticalLevels ( )

Definition at line 128 of file PJRCSpectrumAnalyzer.ino.

◆ loop()

void loop ( )

Definition at line 90 of file PJRCSpectrumAnalyzer.ino.

◆ setup()

void setup ( )

Definition at line 65 of file PJRCSpectrumAnalyzer.ino.

◆ xy()

unsigned int xy ( unsigned int x,
unsigned int y )

Definition at line 79 of file PJRCSpectrumAnalyzer.ino.

Variable Documentation

◆ dynamicRange

const float dynamicRange = 40.0

Definition at line 33 of file PJRCSpectrumAnalyzer.ino.

◆ fft

AudioAnalyzeFFT1024 fft

Definition at line 40 of file PJRCSpectrumAnalyzer.ino.

◆ frequencyBinsHorizontal

int frequencyBinsHorizontal[matrix_width]
Initial value:
= {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
3, 3, 3, 3, 4, 4, 4, 4, 4, 5,
5, 5, 6, 6, 6, 7, 7, 7, 8, 8,
9, 9, 10, 10, 11, 12, 12, 13, 14, 15,
15, 16, 17, 18, 19, 20, 22, 23, 24, 25
}

Definition at line 53 of file PJRCSpectrumAnalyzer.ino.

◆ leds

CRGB leds[matrix_width *matrix_height]

Definition at line 36 of file PJRCSpectrumAnalyzer.ino.

◆ linearBlend

const float linearBlend = 0.3

Definition at line 34 of file PJRCSpectrumAnalyzer.ino.

◆ matrix_height

const unsigned int matrix_height = 32

Definition at line 28 of file PJRCSpectrumAnalyzer.ino.

◆ matrix_width

const unsigned int matrix_width = 60

Definition at line 27 of file PJRCSpectrumAnalyzer.ino.

◆ maxLevel

const float maxLevel = 0.5

Definition at line 32 of file PJRCSpectrumAnalyzer.ino.

◆ myColor

const unsigned int myColor = 0x400020

Definition at line 29 of file PJRCSpectrumAnalyzer.ino.

◆ thresholdVertical

float thresholdVertical[matrix_height]

Definition at line 47 of file PJRCSpectrumAnalyzer.ino.