AnimatedGIFS with No SD Card error

I’ve tried to upload the on AnimatedGIFs on the Shield v.4 using a Teensy 3.6. I see others have had problems with this, as well. I tried to comment out other place. I think the relevant code that I’m not getting right is this


// Chip select for SD card on the SmartMatrix Shield or Photon
#if defined(ESP32)
    #define SD_CS 5
#elif defined (ARDUINO)
    #define SD_CS 15
    //#define SD_CS BUILTIN_SDCARD
#elif defined (SPARK)
    #define SD_CS SS
#endif

#if defined(ESP32)
    // ESP32 SD Library can't handle a trailing slash in the directory name
    #define GIF_DIRECTORY "/gifs"
#else
    // Teensy SD Library requires a trailing slash in the directory name
    #define GIF_DIRECTORY "/gifs/"
#endif

I tried commenting out:`
#define SD_CS 15

and uncommenting:
//#define SD_CS BUILTIN_SDCARD

Everything compiled and uploaded nicely until I changed the commenting. When I changed the commenting, I got the following errors:


Arduino: 1.8.10 (Linux), TD: 1.48, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"

AnimatedGIFs: In function 'void setup()':
AnimatedGIFs:127: error: 'BUILTIN_SDCARD' was not declared in this scope
     #define SD_CS BUILTIN_SDCARD
                   ^
/home/michael/Documents/Michael Davis/arduino/AnimatedGIFs/AnimatedGIFs.ino:203:19: note: in expansion of macro 'SD_CS'
     if(initSdCard(SD_CS) < 0) {
                   ^
Multiple libraries were found for "SmartLEDShieldV4.h"
 Used: /home/michael/Documents/Michael
Multiple libraries were found for "SD.h"
 Used: /home/michael/Documents/Michael
 Not used: /home/michael/Arduino-1.8.10/libraries/SD
 Not used: /home/michael/Arduino-1.8.10/hardware/teensy/avr/libraries/SD
Multiple libraries were found for "SPI.h"
 Used: /home/michael/Arduino-1.8.10/hardware/teensy/avr/libraries/SPI
'BUILTIN_SDCARD' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Multiple libraries were found for "SD.h"
 Used: /home/michael/Documents/Michael
 Not used: /home/michael/Arduino-1.8.10/libraries/SD
 Not used: /home/michael/Arduino-1.8.10/hardware/teensy/avr/libraries/SD

This looks like a problem to me, why is there a library found directly in your /home/michael/Documents/Michael folder?

Mostly because I’m a moron. Seriously, while MS and Apple kind of guide you where to put everything, Linux is more flexible. Which can also lead Noobs like myself to put things in dumb places. Especially libraries and such. I’m not positive how it got there, but that’s my best guess. I’m any case, it’s gone now and my Halloween project, thanks to these forums, is getting some nice slow drive-bys.

I find it odd that the Arduino IDE is even looking for libraries there. Anyway, glad you got it figured out!

Arduino: 1.8.9 (Windows 10), TD: 1.48, Board: “Teensy 3.6, Serial, 180 MHz, Faster, US English”

Multiple libraries were found for “SD.h”
Used: C:\Users\asus\Documents\Arduino\libraries\SD
C:\Users\asus\Downloads\SmartMatrix-master\examples\AnimatedGIFs\AnimatedGIFs\AnimatedGIFs.ino:85:31: fatal error: FilenameFunctions.h: No such file or directory

Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
compilation terminated.

Not used: C:\Program Files (x86)\Arduino\libraries\SD
Error compiling for board Teensy 3.6.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Can anyone help? I have a similar problem and every example library works out of the box except animatedgif

EDIT: I solved the problem lol

The AnimatedGIFs project has several files, and Arduino can’t find FilenameFunctions.h. Make sure it’s in your sketch directory