TwinkleFOX: new Color Twinkles for 2015 Video: https://www.youtube.com/watch?v=CqCaF1bD4Uk Code: https://gist.github.com/kriegsman/756ea6dcae8e30845b5a A year ago,

@Mark_Kriegsman number of lights per unit depends on the unit…could be groupings of 4 or 5 (in a HDD tray) or up to 25 (a flu-width switch with a row of lights over the network ports)…

I saw it by picking a pixel that maybe went red and watching the pattern…you can see green4x, res 2, dark, or some such & repeat…

NOT that I’m complaining mind you!

@Michael_Sime Find this line:
uint8_t slowcycle8 = (ticks >> 8) + salt;
and add this line after it:
slowcycle8 = triwave8( slowcycle8) + slowcycle8;

This breaks the single-LED cycle even further.
(Updated: triwave8 is better than sin8. Faster, and more even hue distribution.)
(Updated again: I’m changing this whole code section, stay tuned.)

BUT, I’ll also stand by my original assertion: there IS a perceptible single-LED pattern, but I’ll bet an orange mocha frappuccino that if there’s a row of 10 or more, there’s no discernible pattern. There might be with just 4 or 5 – but this new bit-mixing thing should help break that pattern further, too.

I am again reminded that the study of randomness and the study of encryption are the same thing. Happily, I get to do one for my day job and the other in the evenings!

@Andrew_Tuline : YED, you’ll need a version of the Arduino that supports C++11 to use Dan’s new pixel set iterators. Version 1.6.6 is working well for me for this. I switched to pixel set iterators because it makes the code (a little) smaller and (a little) faster.

OK, last update. I added more entropy-preservation and bit-mixing, and it’s largely pattern-free now as far as I can see, watching individual pixels or the whole shebang. Hues are better distributed, blinks nice and random. I updated “computeOneTwinkle”; new version is in the published code here:

Enjoy!

@Mark_Kriegsman finally got chance to have a proper tinker tonight, and i think i understand the concept, pretty neat.
The use of nblend now makes total sense to me.

But given the twinkling is effectivly free running, how could you overlay another effect e.g add glitter?

many thanks.

@Mark_Kriegsman works like a charm…all I can check it out on is the test strip over my bench, but would be very interested to see it in the racks…but that will have to wait until they come back home…

next- figure out how to include it in my dual-teensy rig as a pattern option!

@Andrew_Tuline That solved my problem too. Lights are now twinkling…

@Mark_Kriegsman keep getting “‘CRGBArray’ does not name a type” when I try to verify, which seems to refer to line 76… Any suggestions?

I guess more fittingly, I get a slew of errors, plausibly because I’m trying to run from a Gemma?

I think that you need the very latest version of the “master” branch of FastLED from github to get the new CRGBArray class which I’ve now started using.

Also, I suspect that the TwinkleFOX code isn’t going to be super happy on an ATtiny85-based microcontroller like the Gemma; the code does a lot of multiplication and the ATtiny in the Gemma doesn’t even have a hardware multiplier – it has to do all the multiplications ‘longhand’, which is slow and (ironically) makes the code larger. (I really don’t like the ATtiny, mostly just for this reason; I’d rather pay $2 more and get a real hardware multiplier that makes the code faster and smaller, etc., but even so the Gemma is still pretty cute.)

For smaller, less math-intensive code that might go better on an ATtiny (such as found in the Gemma), check out the 2014 version of Color Twinkles. That might ‘fit’ better. https://plus.google.com/112916219338292742137/posts/8yh7fi9Sb5i
It uses a wee bit more RAM, but that’s probably fine if you’re not running too many pixels at once.

Let us know what you find, and what you get working!

Interesting. Had to pare it down a bit to get it to fit, and even then it just squeaked by. Is there a way to set the max number of simultaneous lit pixels? I’m running the power through the board itself, so this is only going to light up to five pixels at a time. Thank you so much for this help!

I’m curious how you pared it down – can you share the ‘lessons learned’?

As for limiting lighting / current draw, I’d ordinarily suggest using the FastLED.setMaxPowerInVoltsAndMilliamps, but I think maybe it won’t fit!

I second the request to see what had to be squeezed out to make it fit on a Gemma. A lot of my associates who make illuminated costumes for the theatre would love to know (better said: I’d love to be able to explain it to them).

OK I lost that thread where I posted but I’m sorry @Mark_Kriegsman Thanks for your help I got them all to work great now on a 432 pixel strip. The problem was I had 2 versions of FastLED. Then on those 2 do a luttle re-arranging and yup it worked finally. So I had 2 reasons why it wasn’t working. I’d have to say I’m impressed. Really like the animations on all on your gethub account.

Glad it’s working! And thanks!

This is such a great program! Is there anyway to change the range-based for loop at 179 from this:
for( CRGB& pixel: L) {
to the older type for loop?
My version of the Arduino IDE won’t compile it:
COMPILE ERROR: range-based ‘for’ loops are not allowed

Thanks!