Implementing FFT on the DUE

Hello. I've been trying to use the Arduino Due to process ranging information from a radar where I need an FFT function. Are there any libraries that anyone has gotten to work on the Arduino Due?


I have found that the FFT library at is quite good. While on an Uno this would be rather slow (hence all the FFT libraries for AVR written in assembler for speed), this version uses more time consuming math functions but with the increased speed of the Due this may be fine for many applications.

It compiles on Due with two changes:

  1. In the library, somehow square is not defined in math.h. You can add #define square(x) (x*x) at the top of the library source
  2. In the example, the code to blink an LED as an indicator is AVR specific. You can port it to pin 13 blinking with little effort or comment out the code and rely on the great Serial.print functions you can enable in the code.

I hope this helps.

Mike from

Uhh sorry to be a bother, but am I blind? I couldn't find a download link on the site. I'm guessing I have to email the blog owner directly?

Yes you have to email him for the whole library. His code, his rules, perhaps if it's popular he will post it in the library links section if asked nicely.

Nope, I do not plan to make any change in my code policy. The reasons are clearly explained and technically benefit to all. And why not say, I enjoy a lot the mails that I exchanged with real smart people, nicely minded with awesome ideas and kind to others.

While I can certainly recommend the code of arduinoos,
I got another library to work on the due.
It might be another possibility
have a look here : Arduino Forum

Here is an FFT library that works at high level so should be OK on the Due. I use it on the Mega. Send him an email with a brief description of your project and he will send you the library in a reply.