Hello guys! i have in a very exciting project using FASTLED,

(Alex Posada) #1

Hello guys!
i have in a very exciting project using FASTLED, but i’m experimenting some framerate problems compared with Neopixel example.
I’m running 300 SK6812 leds equivalents to WS2812B. It is separately in two groups of 150 pixels using multiplestripin1array setting…
The fastled.show() is very slow compared with neopixel show! but FastLED should be faster.
I’m using FastLED.setMaxRefreshRate(60) and all the tricks, but nothing happen. This is my test program… as you see there, it should take 10 seconds exact (625*16), but it takes aprox 18 seconds … any ideas?

This is my code…


r = (countFrame / 625.) * 255 ; // only red fade in
if(countFrame > 625)

setAll(r, 0, 0, 0);


void setAll(byte red, byte green, byte blue, byte white) {
for(int i = 0; i < NUM_LEDS; i++ ) {
setPixel(i, red, green, blue, white);

Also, if i put out timer and only the loop, the programa takes 13s to update the strip instead of 10 seconds… it means that is not possible to go at 60fps using 150 leds? Neopixel works at 62fps with same setting!
what is happening here?

thanks for your help! and enjoy your projects!

(Alex Posada) #2

… i’m using Adafruit Feather M0

(Yves BAZIN) #3

@Alex_Posada could you post the entire code on gist ?
Which board are you using ?

(Alex Posada) #4

Hey, yes i forgot and commented again… :slight_smile:
I’m using Feather M0 and also Arduino Zero. It should be compatible with the lib! Thanks!

(Yves BAZIN) #5

@Alex_Posada are you using rgbw leds ?

(Alex Posada) #6

Yes! using a rgbw.h struct… but this does not have to affect the performance … I only have 25% more bytes to update. My 150 RGBW leds are equivalent to 200 normal WS2812B.

(Alex Posada) #7

There are my add functions:
FastLED.addLeds<SK6812, DATA_PIN_1>(ledsRGB, 0, getRGBWsize(NUM_LEDS)/2);

FastLED.addLeds<SK6812, DATA_PIN_2>(ledsRGB, getRGBWsize(NUM_LEDS)/2, getRGBWsize(NUM_LEDS)/2);

And works great!, my only problem is the refresh!

(Yves BAZIN) #8

@Alex_Posada I don’t think Fastled supports rgbw. But I get that the ‘pushing’ should be the same way. I know that fastled does some precalculation but pushing 400leds should be done in at most 75fps.

(Yves BAZIN) #9

@Alex_Posada could you measure the time taken for a fastled.show ?

(Alex Posada) #10

I don’t know how, but using my timer i estimate that needs around 18ms-20ms and this is too much for only 400 LEDs!!! I measure the time to do 625 frames in the loop and it needs 18 seconds aprox… we can dismiss the rest of the code time… attached is my complete test code!


(Yves BAZIN) #11

@Alex_Posada indeed this is really slow. I can’t access your code for unknown reason

(Alex Posada) #12

@Yves_BAZIN the link works for me. What is the problem?
send me your email and i can send you attached! thanks!

(Yves BAZIN) #13

@Alex_Posada could you comment
and see ?

(Alex Posada) #14

@Yves_BAZIN this dosnt affect… same result. I think maybe could be a problem of optimization using Zero boards… what you think? i didnt have a lot of time now, but i want to solve this in the next weeks! definitely fastled has to work :slight_smile: it’s a great software development …
… for the moment and for this project I’m using neopixel that gives me a framerate of 50-60 fps without problems. It changes a bit depending of animations, math operations, etc…

(Yves BAZIN) #15

@Alex_Posada yes indeed because I don’t see anything wrong with your code and you should be able to push 600pixels at 55fps so I don’t know the real reason for it to be so slow.

(Alex Posada) #16

@Yves_BAZIN ye, it’s really extrange… maybe is the last update for arduino zero…? i can’t try it with other boards now… but i will do. Finally , can you download the files? if not, tell me and i can send you by email or upload to other site…

(Yves BAZIN) #17

@Alex_Posada i got your code yes.

(Alex Posada) #18

@Yves_BAZIN how are you? i have some time next days to continue with the research. How you know, i have some Zero Boards that we make to control some strips at same time. But, we are experimenting this issue. Any ideas how to continue? where to find the problem? Do you thing SAMD21 compatibility is 100% tested with last versions of FastLED? can you try this example in one zero compatible board (genuino zero, M0, Feather M0, …)? I think there is an issue with the library and this boards. Thanks!