Hi,
I’m trying to use the FHT librairy from (ArduinoFHT - Open Music Labs Wiki). I used the example code provided on the link, which is the following :
#include <FHT.h> // include the library
#define LIN_OUT8 1
#define FFT_N 64
void setup()
{
/*Turn off timer0 for lower jitter -
delay() and millis() killed*/
TIMSK0 = 0;
/*set the adc to free running mode*/
ADCSRA = 0xe5;
/*use adc0*/
ADMUX = 0x40;
/*turn off the digital input for adc0*/
DIDR0 = 0x01;
Serial.begin(115200);
}
void loop()
{
while(1)
{ // reduces jitter
cli(); // UDRE interrupt slows this way down on arduino1.0
for (int i = 0 ; i < FHT_N ; i++)
{ // save 256 samples
while(!(ADCSRA & 0x10)); // wait for adc to be ready
ADCSRA = 0xf5; // restart adc
byte m = ADCL; // fetch adc data
byte j = ADCH;
int k = (j << 8) | m; // form into an int
k -= 0x0200; // form into a signed int
k <<= 6; // form into a 16b signed int
fht_input[i] = k; // put real data into even bins
}
fht_window(); // window the data for better frequency response
fht_reorder(); // reorder the data before doing the fft
fht_run(); // process the data in the fft
fht_mag_lin8(); // take the output of the fft
sei();
Serial.write(255);
fht_lin_ou8[0];
Serial.write(fht_lin_out8, FHT_N/2);
}
}
But I get the following error:
’fht_lin_ou8’ was not declared in this scope
Does anyone have an idea ?