Background

We can combine waves at different frequencies and amplitudes to generate complicated waves.


A Fourier transform takes a complicated looking wave and spits out the individual frequencies that it contains.


Sampling

We can sample a wave with a freqency equal to half of our sampling rate. So,  if we are sampling at 10,000 Hz, we can sample wave of 5000 Hz.




Input Circuit


Sample Code


References

ReferenceURL
Arduino FFT Libraryhttps://github.com/kosme/arduinoFFT
ESP32 spectrum analyser VU meter using arduinoFFT and a FastLED matrixhttps://www.youtube.com/watch?v=Mgh2WblO5_c
ESP32_FFT_VU - Codehttps://github.com/s-marley/ESP32_FFT_VU