When I apply FFT and get the arrays, I take the two that contain real numbers, run it through a loop to square two values obtained from the same position in the array and add them together to get the magnitude. Once I have the magnitude I divide it by the sampling rate (which in my case is 256) and that will give me my frequency value?

There is a little I can comprehend in your question. First of all, you need to ask yourself what frequency you need to find?

Secondly, what is the bandwidth of the input. For example, you want to get an audio spectrum 20 - 20 000, which means sampling rate has to be 40 000 and up. But, if there is an interference at 22 500, you have two option:

suppress interference using analog (RC, LC, RLC) filter, or increase sampling over 45 000. So at this stage, it's you, who is setting a framework, and FFT is just simple mathematical procedure, that searching in a data pull it's was feed with by you.

Magnitude calculation last stage, here is the example from my earliest project:

` //Performing FFT, getting fx[] array, where each element represents`

//frequency bin with width 65 Hz.

fix_fftr( fx, log2N );

// Calculation of the magnitude:

for (i=0; i<N/2; i++)

{

fx[i] = sqrt((long)fx[i] * (long)fx[i] + (long)fx[i+N/2] * (long)fx[i+N/2]);

}

http://coolarduino.wordpress.com/2011/02/10/color-organ-spectrum-analyzer-on-arduino/