Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I think Heat drift has a bug #1

Open
devoh747 opened this issue Nov 16, 2020 · 7 comments
Open

I think Heat drift has a bug #1

devoh747 opened this issue Nov 16, 2020 · 7 comments

Comments

@devoh747
Copy link

devoh747 commented Nov 16, 2020

    // Next drift heat up and diffuse it a little bit
    for (int i = 0; i < Size; i++)
        heat[i] = (heat[i] * BlendSelf +
                   heat[(i + 1) % Size] * BlendNeighbor1 +
                   heat[(i + 2) % Size] * BlendNeighbor2 +
                   heat[(i + 3) % Size] * BlendNeighbor3)
                  / BlendTotal;

Say the Size is 10 and coming thru the loop we are at i=9
(i+1) % Size will evaluate to 0
(i+2) % Size will evaluate to 1
(i+3) % Size will evaluate to 2

So at pixel 9 you will be adding in the heat[0]*Blend+heat[1]*Blend+heat[2]*Blend when it should be the heat from heat[8]*Blend+heat[7]*Blend+heat[6]*Blend. I figure you need something so that you do not go outside the array.

@davepl
Copy link
Owner

davepl commented Nov 17, 2020 via email

@devoh747
Copy link
Author

devoh747 commented Nov 17, 2020

Oh so it was meant for the fans and not the general case of the pixel strips. The code from https://github.com/davepl/DavesGarageLEDSeries/tree/master/LED%20Episode%2009 has a ClassicFireEffect and a FireEffectSmooth. The ClassicFireEffect has the code I mentioned above. I guess I should be using the FireEffectSmooth if I am not using a circular fan?

I am trying to use a 60led/meter strip and get a similar fire to what you have in your windows and art piece behind you. I have yet to get anything close. I'm using FireEffect fire(NUM_LEDS, 8, 5, 15, 2, true, false); and I think it's has a nice rolling look but it's missing the billowing yellows. Are you using the heat pallet or a custom pallet where you stretch out the yellow? My "uneducated guess" we need to do something to expand the yellows... perhaps a custom pallet. Can you share more on how they are doing it in your windows and art piece?

@Zuni1971
Copy link

Zuni1971 commented Apr 4, 2021

i was trying to make my house look like Dave's but it must be a secret as there is no update in this section about the fire lights.

@Galaxy-Man
Copy link

Galaxy-Man commented Jul 2, 2023

Has anyone managed to get the house on fire effect yet, Ive spent 3 days looking at this and tried many variable but ot no avail :-(
Cannot get the Smoothclass working just looks like a maquee!
Does anyone have the correct settings.
Would like to order my parasol by the summer and build this for the kids.
BTW great work and YouTube channel, wish it was the 80's

@davepl
Copy link
Owner

davepl commented Jul 2, 2023 via email

@Galaxy-Man
Copy link

Galaxy-Man commented Jul 3, 2023

Hi Dave,

Aprreciated the prompt reply, even though I have not got it doing what yours does I am having fun learning. I think adding rotary knobs for each variable will allow me to adjust live and not wait for recompile and upload, this is my next task. I think this will help me solve the issue. There is nothing wrong with your code just me trying to find the settings to mimc what yoiu did in your window flames.

Im using Demo 10 code with these values.
fire.h using this only
ClassicFireEffect fire(NUM_LEDS); // NUM_LEDS =144

How did you wire the parasol? of the eight strips did you parallel the data lines together or does each data line have their own pin assigned?

Thanks
Ian

@Galaxy-Man
Copy link

This is closed I have resolved the challenges. Thanks for your help dave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants