Quick video of "Fire2012" Here's what the "Fire2012" fire simulation looks like when running

Quick video of “Fire2012”
Here’s what the “Fire2012” fire simulation looks like when running. Here it’s running on a strip of thirty WS2812B pixels on one of those high-density 144-pixel-to-the-meter strips. Microcontroller is an Arduino Nano. The LED strip is diffused through a section of white ‘cable organizer’ tubing (technically “split loom tubing”).
Source code is here Fire2012: an Arduino/LED fire simulation for FastLED - Pastebin.com
Definitely looks best with the FastLED v2.1 Beta release, but works fine with the v2.0 release, too.

Those high density strips make the effect more realistic looking.

The original Five Elements was 30/meter-- low density. But the diffuser was 4-6 inches from the LEDs which matters a great deal too.

If I were to put this in my window display, I fear the neighbors might start dialing 911 …

Nice! Very realistic

thats funny thats the exact same setup i have minus the cable orginizer im testing with plexi tube and sanding it down so its frosted

This effect looks amazing! I just added it to my music effect hat (show off post will follow…). :slight_smile: Thank you, Mark!

I haven’t noticed any difference in (general) output with the FastLED2.1 library - as I understand the dithering function is enabled by default? Is there anything I have to do to get dithered output?

Yep, dithering is enabled by default. It makes a more and more visible difference as you lower the master brightness control with FastLED.setBrightness(…)

I have it running at brightness 40 due to power (battery) restrictions, I will do some more tests tonight.

Excellent. That’s exactly what it’s designed for! At lower brightnesses like that, dithering should help colors look better and the overall animation look smoother.

For best visual results, replace calls to regular “delay(…)” with calls to “FastLED.delay(…)”; the library will use the time to keep the LEDs actively refreshing with dithered output.

Hi Mark, Just wanted to confirm what I need to buy in order to make this. I have a Raspberry Pi, but I understand this will not work with the 281X strip due to clock restrictions. Can I run this using an Arduino Uno R3, is there a better model? as well as some 2812 or 2811 strip? I’m also thinking of making a lava lamp effect, which I think would be really cool, what do you think, possible with a single strip?

I like the lava lamp idea!

This code, and FastLED, will run fine on pretty much any model of Arduino, and since you’re most likely only using one output pin and no ‘shields’, I’d go for small and cheap. And Uno will work fine, but so will a Leonardo (often cheaper), or a Nano (cheaper AND smaller), or a Pro Micro. I also like the Teensy 2 (which has an AVR chip), and even more so the Teensy 3.1 (which has an ARM chip); the library supports both.

As for LEDs, FastLED supports WS2811, WS2812, WS2812B, and many other LED controller chips. I’d choose a strip that offers the pixel density you like. The video here is 30 pixels of very dense (144 pixels / meter) WS2811 LEDs. For a lava lamp you might also want this kind of high density, compact, strip.

Just for reference, when I most recently taught a class on this stuff, I had the students us a cheapie ($9) Leonardo-compatible Arduino clone and a strip of 30 five-volt WS2811s. People were up and blinking in just a few minutes, and the cost was modest.

Let us know how your project progresses!

Im runing your code and printing the colours with the LPD8806 strip.setPixelColor(j,leds[j].red,leds[j].green,leds[j].blue); and I get just a red fire, with sparks and cooling but just red colour :frowning:

Pepe: sounds like you’re using the Neopixel library. Yes? If so, could you post the whole code to pastebin and put the link here?

Is just the LPD8806 library, this code https://github.com/adafruit/LPD8806/blob/master/examples/strandtest/strandtest.ino with your “Fire2012()” added at the bootom http://pastebin.com/QBacFT62 (note the line 25 added). I dont have the real code but this is the library and key modiffications. Thanks Mark!

Thanks and I’ll look at the code. Is there a reason to use Adafruit library instead of the FastLED library, which also supports LPD8806 natively? I’m just trying to understand what your goals are overall.

“Line 25” looks about right to me.

I have some efects already codded with the library mentioned because I founded many examples and effects with this library, then I wanted to test you effect. I would like to be able to see it working, then I can think about migrating all the functions to take advantage of FastLED options. The problem with line 25 seems to be the range of values passed to the strip.setPixelColor function… too big to see the differece between colours???

I’ll see if I can take a look deeper later today.

The code all looks correct to me. So I would ask three things to help diagnose:
First, can you verify that the LPD8806 strip is working correctly for all colors with other animations? I presume yes, but it is worth checking.
Secondly, if you have a different LED strip type (.g. WS2811/WS2812), could you try testing with that?
And last, could you post a link to video of exactly how it is looking when you run this? Thanks!