Profile cover photo
Profile photo
Mark Kriegsman
I make things, e.g., Veracode, FastLED, and trouble.
I make things, e.g., Veracode, FastLED, and trouble.

Mark's posts

Personal announcement, and a request
Dear FastLED friends,
About a week ago, +Daniel Garcia and I lost a close and beloved family member, without warning, at age 41. We are devastated.
Many people who have known have reached out to ask how they can help offer support in this terrible time, and we're blessed to have so much love and support in our lives.
While Dan and I are trying to make sense of any of this, and grieve, I'd like to ask that you, the good people of the FastLED community, help us by helping each other a little bit extra while we step away for a bit. I love how much the members of this community have always helped and supported each other, and all I ask now is that you keep doing exactly that: support each other. Be helpful, and patient, and playful, and warm. Dan and I are still 'here', but right now we need to ask the rest of the community to take care of each other while we step away to handle our terribly sad loss.
Thank you for understanding and sympathy, and for helping each other so much, as you always have. And today, right now, reach out to someone you haven't spoken to in a while, and tell them you love them.

Post has attachment
Just call me Ranger LED Program. 

Post has attachment
When you bury LEDs in the ice, with the beer.
(Foreground bottle: "I Love Lamp" from Evil Genius Brewing Co.) 

Post has attachment
Five years ago today, I lit up my first LED art gear. I wrote a little bit about it here: "If something intrigues you, step toward it."

Post has attachment
Boston is expected to get a good dose of snow over the next day, and I can't resist laying down some lights shine up through the snow. Here's what they look like just lying on top of the existing snow. Hopefully tomorrow night I can post a second video showing what they look like with the new snowfall on top. ( < 1min)

P.S. "IP68" FTW.

Post has attachment
Exploring a spherical pixel layout idea...

Change to 'noise' functions
So this is awkward: I finally found and fixed an integer overflow/underflow bug that had been lurking in the FastLED 'noise' functions for a long time. Before, due to the internal math overflow, the noise functions could sometimes produce significantly 'discontinuous' output, like:
21 22 24 26 172 173 174 175 (for example)
With the new code change in place, the output is more or less 'continuous', like:
21 22 24 26 28 30 31 32 33 33 (for example)

While this is definitely a bugfix, bringing the code much more closely in line with how it was designed and intended to behave, it could also result in a significant change in the appearance of your existing animations if they use the noise functions.

But if you want the old behavior, you can have it. Locate the file "fastled_config.h", and uncomment the line that says
With that line uncommented, the noise functions will revert to their old behavior -- including the discontinuities, which you may have used in some advantageous way in your animations.

These changes are, at present, found only in the latest version of the master branch on github.

Sorry if this disrupts your work, or requires you to change the flag for existing animations.

We try pretty hard not to make changes that aren't backwards-compatible, and this one was a tough call. There's no one right answer here, so we changed the code to the 'new' (correct, intended) way, but provided a flag for you to stick with the old way if you so desire.

Post has attachment
You never know who's using FastLED.
+Daniel Garcia

(This is a panel from today's Bloom County cartoon: If you didn't know that Bloom County is back, well, now you do! NPR covered the story of the strip's return: )

TwinkleFOX - holiday twinkle lights: Tweaked & Updated
I updated last week's "TwinkleFOX" twinkling holiday lights code with a number of aesthetic tweaks, and re-posted the new code. Discussion and updated continue in the original thread:

NOTE that you will need the latest FastLED from github AND Arduino IDE v1.6.6 or later to use the new version of TwinkleFOX! (I'm using the slick new C++11 'range iterators', and they're only present in the very latest FastLED code from github.)

Post has attachment
TwinkleFOX: new Color Twinkles for 2015

A year ago, I offered up 'twinkle lights' for the holidays, and I've been thinking about them in the back of my mind ever since. I now humbly offer up "TwinkleFOX" : new, improved, and internally MUCH weirder!, color twinkle code.

As before:
- use at many (or as few) color palettes as you like
- several 'holiday' color palettes are included
- palette cross-fades
And now, new/improved:
- Much easier control over twinkle speed and density
- Smoother fading in and out; truer, smoother color fades
- Optional "background color" (other than black)
- Lower memory usage: zero(!) bytes per-pixel overhead
- Weird new internal design, which led to the new name: TwinkleFOX

Why is it called TwinkleFOX? Because the entire state of every LED in the array can be generated as a Function Of X, where X is a clock. There's no need for storing the 'state' of each light: everything is a function of time. Much longer comments are in the code itself, here But the basic idea is this: if you had only ONE pixel, and you wanted it to fade in and out, you could say something like:

pixelbrightness = sine( time )

And then given a particular point in time you could easily tell what brightness the pixel should be, right? (In a sense, this is how the 'noise' functions work, too.)

Well, so that's more or less what's going on here, too, except (1) each pixel has its own time clock, (2) each time clock moves at a slightly different speed, (3) each time clock has a slightly different zero-offset, and (4) none of this data has to be stored in precious RAM... it's all "stored" in a random number generator. Yeah. Like I said: much weirder internals this time!

Feel free to just run the sketch and look at the pretty lights, or dig in and ponder the code. It took me months and months of background-thinking about this before I implemented it, so if it seems hopelessly abstract, you might be right about that.

Oh, and aesthetically, if you run it on an LED strip, instead of a pixel string, I recommend dropping the TWINKLE_SPEED and TWINKLE_DENSITY both down from "5" (the default) to "4" -- but that's a parameter you can play with yourself! See code for details.

Enjoy, and may your holidays be happy and filled with light!

UPDATE: of course, I've found minor typos and things in the code, which I've fixed in the posted code now. If it's not doing quite what you expect, just try re-downloading the latest version.
Wait while more posts are being loaded