-1

I'm trying to use the FHT librairy from (http://wiki.openmusiclabs.com/wiki/ArduinoFHT). 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

I canot resolve this probleme, ans help would be appreciate

2
  • There's three versions of the library on that site. I can't find that code you post in any of them. Commented Apr 30, 2016 at 10:39
  • Even the "program example" link is something different. Commented Apr 30, 2016 at 10:40

1 Answer 1

1

May be you should try to replace :

fht_lin_ou8[0];

with :

fht_lin_out8[0];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.