Pages: [1]   Go Down
Author Topic: Implementing FFT on the DUE  (Read 1917 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Thanks
Logged

US
Offline Offline
Full Member
***
Karma: 4
Posts: 183
Electronics are the new Legos
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have found that the FFT library at http://www.arduinoos.com/2010/10/fast-fourier-transform-fft/ 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 http://21stdigitalhome.blogspot.com/
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

US
Offline Offline
Full Member
***
Karma: 4
Posts: 183
Electronics are the new Legos
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 2
Posts: 109
ArduiYES!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 : http://arduino.cc/forum/index.php?PHPSESSID=333c25641c0e664627c7184835dd6bcb&topic=140107.msg1052439#msg1052439
Logged

St. Petersburg, FL
Offline Offline
Jr. Member
**
Karma: 1
Posts: 61
Retired physicist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://www.arduinoos.com/2010/10/fast-fourier-transform-fft/
Logged

Pages: [1]   Go Up
Jump to: