FastLED on Photon

So, I just came home from a great time at the Bay Area Maker Faire with a shiny new Photon. Thanks!

I opened a sketch that uses FastLED to run 60 APA102 LEDs and compiles fine when I target one of my Cores, but I get the following error when targeting the Photon.

I’m sure this is because of the different processor in the Photon vs the Core, and it’s just a matter of patiently waiting for @dgarcia, @kriegsman, or some other generous genius to port FastLED to the Photon. I don’t mind waiting, I totally understand the rarity of their spare time, and really appreciate the effort they put into the project. I just wanted to be the first to report the issue. :smile:

In file included from /spark/compile_service/shared/workspace/6_hal_12_0/firmware-privafastled-apa102-60.cpp:1:0:
/spark/compile_service/shared/workspace/6_hal_12_0/firmware-privaFastLED/FastLED.h:12:2: warning: #warning FastLED version 3001000 (Not really a warning, just telling you here.) [-Wcpp]
#warning FastLED version 3001000 (Not really a warning, just telling you here.)
In file included from /spark/compile_service/shared/workspace/6_hal_12_0/firmware-privaFastLED/FastLED.h:34:0,
from /spark/compile_service/shared/workspace/6_hal_12_0/firmware-privafastled-apa102-60.cpp:1:
/spark/compile_service/shared/workspace/6_hal_12_0/firmware-privaFastLED/led_sysdefs.h:19:43: fatal error: platforms/avr/led_sysdefs_avr.h: No such file or directory
#include "platforms/avr/led_sysdefs_avr.h"
compilation terminated.
make[1]: *** [../build/target/user/platform-6fastled-apa102-60.o] Error 1
make: *** [user] Error 2

Error: Could not compile. Please review your code.

Working backwards through the errors:
firmware-privaFastLED/led_sysdefs.h:19 is including a header that should only be included on an AVR. It’s getting there by default because STM32F10X_MD isn’t defined when compiling for the Photon. You could figure out what equivalent definition is set by the compiler for the STM32F2xx and add that to the header, but that would probably just expose another incompatibility.

@dgarcia didn’t make it to Maker Faire, can someone on the Particle team make sure he gets a Photon ASAP? (Pinging @zach ) I’d volunteer one of mine but it has to get to NYC first, then head right back to the Bay Area.

I’ve got two already ordered and on the way - in fact I believe I just got my shipping notification today : )

It is true that FastLED goes pretty tight on platform definitions (and falls back to avr/arduino if it doesn’t recognize any platforms, to give it some chance of playing).

It’s possible that’s all that’s needed will be the new define, but that also depends on how consistent ST Micro are with their peripherals across generations. (Some manufacturers are good about this, and some aren’t, not that i’m particularly glaring at Atmel for any NDA’d reason right now, or anything).


Also, also - for FastLED issues, if you want them to be even more likely to get noticed/tracked - they should be thrown into the github tracker -

Done, thanks!

@dgarcia I’m glad to hear it! I’ve got one Photon from Maker Faire (thanks @mohit!) and I’m going to the Hackster Hackathon event this weekend planning to port SmartMatrix to the Photon. Of course if that works the first thing I’ll want to try is to layer FastLED on top.