Audio Library FFT with ADC input

Status
Not open for further replies.

markvr

Active member
I'm using the new Audio library from Paul to sample from an analog pin and perform an FFT. It works great, and is far simpler (and I imagine vastly more CPU efficient) that my original efforts of simply looping with analogRead().

I'm curious though at what frequency does it sample at, and can I change this?

Also for anyone else doing similar things it seems to have a low volume cutoff, where below a certain volume level all the outputs read 0. I've had look in input_adc.cpp, and there are two lines:
Code:
analogReference(INTERNAL); // range 0 to 1.2 volts
//analogReference(DEFAULT); // range 0 to 3.3 volts
I'm using a mic/opamp breakout board from Adafruit, which outputs from 0 to V (where V is the input it's powered with, i.e in my case 3.3v) with a dc bias at V/2, and so for me swapping these lines around to range from 0-3.3 made it much more sensitive.

Thanks!
Mark
 
Have just worked out the bit about the frequency, there is a define in util.h of:
// 48e6 / 44100
#define PDB_PERIOD 1087

So it's unsurprisingly 44.1khz, and presumably can changed as above!
 
Status
Not open for further replies.
Back
Top