Hello everyone! First of all, thanks for the hard work,

Hello everyone!
First of all, thanks for the hard work, you really did something awesome!
However, I’m running in some troubles with the lib!

I’m using a custom board, based on an Atmega 328, running at 8Mhz. (we plan to release the board as open source, it’s something that fits under an Xbee radio, and that uses the arduino IDE).

I’m connecting the board to a neopixel shield from Adafruit (40 leds, grb, ws2812b).

My problem is as follows :
I compile and upload the cylon example.
When it first starts, it’s running well, but after a few minutes, it starts to act strangely, randomly lighting up some leds to random colors, and after a few minutes more, it’s just a fast blink of white led, juste like in the video.

The board gets its clock from an on board 8Mhz resonator, so I expect the clock to be clean.

What do you think?

ff85c0bcdbbca0d3aeb766d0a9094aed.gif

And if I reduce the number of leds connected (from 40 to 5 for example) it just lights 5 leds in white, while the first just blink in red.
I suspect some kind of memory corruption or something similar.

What version of the library are you using? The 328 code in the master branch is not setup for being run at 8Mhz. You might need to give the 2.1 branch a try.

I checkout the code from the github repo, but I reckon I used the 2.0 version. I can’t remember if I tried using the 2.1 .
I’ll give the 2.1 a try tomorrow and I’ll keep you updated.

yeah, 2.0 is what’s on the master branch right now - and I didn’t discover the 8Mhz 328 issue until about a month ago.

Got it, will try tomorrow then!
Out of curiosity, what was the glitch?

Not really a glitch so much as the code for the 328 AVRs made some assumptions about how many cycles it would have available. 8Mhz halves the cycles and in some cases made the timing dicey, and the WS2812B’s are very particular about their timing.

So, I changed it so that if you’re only running at 8Mhz, it uses the ATTiny/Trinket version of the code, not the general AVR version.

Ok, now it won’t even compile. Maybe I should add a define or something…
It gives me error in the chipset.h file, lines 302, 305, 308, 311

"In file included from C:[…]\libraries\FastLED/FastLED.h:10,
from sketch_mar06a.ino:1:
C:[…]\libraries\FastLED/chipsets.h:302: error: expected template-name before ‘<’ token
C:[…]\libraries\FastLED/chipsets.h:302: error: expected `{’ before ‘<’ token
C:[…]\libraries\FastLED/chipsets.h:302: error: expected unqualified-id before ‘<’ token
[…]
"

Ok - repull and try again - some code re-organization that i was working on broke the avr side of things on the 2.1 branch (I had been focusing on the teensy 3.1 there)

It works! Yay! That’s awesome! Thanks!
I doesn’t work when I compile in Atmel Studio though. But i’ll keep using Sublime Text and Stino for a little while, I think I messed up my config in Atmel Studio!
Anyway, thanks a lot!

The library doesn’t technically support building in atmel studio yet (though this version will be much easier to do that with than the original FastSPI_LED) - there’s still a backlog of arduino environment platforms (and LED chipsets) that I need to get in support for before I peel off to support building in atmel studio directly. A couple people on here have managed to tweak it into place though.

Ok, nice to know. Keep up the good work integrating the other platforms!

I’ll find a way (or not, as for now, it doesn’t matter to me!)