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

Please do! It’s a nice simple simulation and should port relatively easily. Let me know if I can help!
And thanks for checking in- always nice to hear what people are doing!

And yes, that’s a big part of why I like to ask first – it serves as a heads-up that someone’s work is being seen and appreciated. :slight_smile:

Hi Mark─ I have been busting my brain trying to figure out why others can compile this code and I cannot. The main error I am getting is in Step 4 as follows:
__________________________________________________________________
C:\Users\Gary\AppData\Local\Temp\build7265112532029152507.tmp\Fire2015.cpp.o: In function Fire2012()': C:\Program Files\Arduino/Fire2015.ino:98: undefined reference toHeatColor(unsigned char)’
collect2.exe: error: ld returned 1 exit status
Error compiling.
__________________________________________________________________

I would love to be able to try this on my neopixel strip. Do you have any ideas as to what is wrong?

1 Like

How are you compiling this? Arduino IDE?

Yes I am using Adruino 1.6.4 and Neopixels.

I just got it working…seems I was missing the last part of the code and all I needed to do was include the adafruit neopixels. Now my only problem is how to reverse my strip so that I do not need to turn my assembly upside down. I am only one month into this Arduino and can use all the help I can get.

I think other folks have reversed the fire effect here before. If memory serves, it’s a one-line change. If you can’t find it here first, I’ll see if I can whip up the one line for you later tonight.

Thanks Mark…I tried using a line from the code for Knight Rider to reverse the direction but it did not work.

@Mark_Kriegsman I’ve added Fire to my LEDStrip simulation.

@Gary_Taylor Try this change:

// Step 4.  Map from heat cells to LED colors
for( int j = 0; j < NUM_LEDS; j++) {
    leds[NUM_LEDS - j] = HeatColor( heat[j]);
}

@dougal Looks good! I would change that led index line to this:
leds[(NUM_LEDS-1) - j] = HeatColor( heat[j]);

Oh, yup, you’re right. I forgot to subtract one from that index. I kept looking at it thinking something was wrong, but it wasn’t coming to me last night. That’s what happens when I do sleepy coding. :slight_smile:

1 Like

Thanks Mark, that did the trick. :slight_smile:
Next I thought that I would see how this works with the Fire2012WithPalette but now I have another error that I do not understand. Let me know if you know what is wrong.

Arduino: 1.6.4 (Windows 7), Board: “Arduino Uno”

Build options changed, rebuilding all

Fire2012WithPalette.cpp.o: In function Fire2012WithPalette()': C:\Program Files\Arduino/Fire2012WithPalette.ino:152: undefined reference toColorFromPalette(CRGBPalette16 const&, unsigned char, unsigned char, TBlendType)’
collect2.exe: error: ld returned 1 exit status
Error compiling.

Hey Mark, thanks for sharing this great code.
Unfortunately, I get an error when i try to compile the code.
I’m running Arduino IDE and get the following error code:

fire-2.cpp.o:/Users/User/fire-2.ino:122: first defined here
collect2: error: ld returned 1 exit status

Could somebody help me to fix it?

David - The error does not help much. Do you have the library installed?

Yes, I installed the library. But I got rid of the problem yesterday by reinstalling arduino IDE and the libraries. Thanks for ur Support!

I know this is a very old topic, but I wanted to share an application of this “fire2012” code. I’m using FastLED and a strip of 20 APA102-2020 LED’s inside a 100mm water reservoir (for a water cooled computer.) The “fire” animation is for letting me know when the water temperatures are on the warm side:

Hello, your achievement is fantastic.
I am French, I speak little English, so I will translate my exchanges, sorry if there are any errors.

I know I am dating a very distant topic and hope not to bother anyone with this.

I have a light plate project with a mega arduino, and ws2812 addressable leds.

These are installed as a S (see image 1).
10 lines x 60 leds

Image 1:

I use the fastled library to create my 2D table and display my first name PATRICE (image 2).

Image 2:

Do you think it is feasible to put your Fire2012 code on the white light up part?

If I change my drawing or first name on my 2D board, will everything have to be changed to the Fire2012 code? The idea would be that it follows the lit part.

Thank you for the help you can give me.
Hope to read you.
Patrice

Hi @tdd69 and welcome to Maker Forums!

While there is an archive of old Google+ FastLED content on Maker Forums, the FastLED community has requested that new conversation happen on Reddit:

Hello mcdanlj, yes, I understand, I will try this. Thank you

Edit: it’s done. With my other alias thunderdarkdevil :wink: