Problems compiling FHT? Andrew Tuline ,

fastled-support
gplus
(Robert Atkins) #1

Problems compiling FHT?

@Andrew_Tuline , I’m getting errors when I try to compile your FHT example (https://github.com/atuline/FastLED-Demos/blob/master/fht_log/fht_log.ino) under Arduino 1.6.5 (Teensyduino 1.26-beta1) for a Teensy 3.0:

[…]/libraries/FHT/FHT.h:1248:4: error: unknown register name ‘r29’ in ‘asm’
);
^
[…]/libraries/FHT/FHT.h:1248:4: error: unknown register name ‘r28’ in ‘asm’
[…]/libraries/FHT/FHT.h:1248:4: error: unknown register name ‘r23’ in ‘asm’

(This continues, complaining about just about all the registers between r16-r31 for about twenty lines)

Out of interest I also set the Arduino to compile for Teensy 3.1/3.2 and got the same result, so it’s not that. Any clues?

(Robert Atkins) #2

Wait, did I just derp the heck out of this—is the FHT library only for AVR and not ARM?

(Robert Atkins) #3

Yes, it appears so. Now investigating the Teensy Audio library…

(Andrew Tuline) #4

What a drag. I haven’t tried it on a Teensy myself (been playing Nano/Pro Micro). I’ll eventually need to find an FFT/FHT library that DOES work on it.

(PaulStoffregen) #5

The Teensy Audio Library has 1024 point FFT which absolutely does work.

(Robert Atkins) #6

Looks like I’m pretty squeezed for RAM on a 3.0 though (which is all I have to hand), even if I use the 256 point FFT :-(.

How much would you expect it to use, roughly?

(Robert Atkins) #7

I am getting hella-weird results with the FFT stuff compiled into an otherwise simple sketch and @Daniel_Garcia suggested it might have something to do with interrupts (they’re WS2812B strips.) No beat detection for me :frowning:

(Robert Atkins) #8

… yeah, looks like it’s interrupts. Again, bane of my freakin’ existence.

(PaulStoffregen) #9

Maybe the new tutorial video can help you? For the FFT part, start watching at 34:55.