# So I think I've butchered it at this point but I have a strip(1

(Matt) #1

So I think I’ve butchered it at this point but I have a strip(1 data pin) of 71 led, I was tryingto set it up to do the Fire demo on 3 different segments. 22, 26, and 23. I’ve had partial pieces work. I think part of my issue is getting lost in the ‘heat’ portion.

https://hastebin.com/movofiyoqi.cs

(Yves BAZIN) #2

@Matt12
In each of your function you have something like this
for( int k= 23 - 1; k >= 2; k–) {
heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;
}
Each time you are overriding all the leds from 2 to 23-1 in that example.
So the last function called will be displayed.
If you want each effect to affect only one part of the strip than you need to modify that.

(Matt) #3

@Yves_BAZIN I did try that a few times but maybe I had something wrong. I believe I was doing something like this for( int k= 48 - 1; k >= 23; k–)

(Yves BAZIN) #4

@Matt12 indeed that sound better
Explain exactly what you want to do ?
you want to split the strip in 3 parts
from 0 to 22 for 22- 26 ??? and then 49 to 71 ??
Can you clarify this?
It will help me correct your code.

(Matt) #5

Yup, I am wanting 3 fires in one strip, 0-22(reversed), 23-46(normal), then 49 -71

(Yves BAZIN) #6

@Matt12
try this
https://hastebin.com/urogafajiq.cs

(Yves BAZIN) #7

@Matt12 did it work ?

(Matt) #8

@Yves_BAZIN Just got to my computer, going to try.

(Matt) #9

Worked great except first strand, uncommented the thing you commented(the reverse direction code) and it’s perfect.

(Yves BAZIN) #10

@Matt12 oh yes you wanted reverse
Small video ?

(Matt) #11

@Yves_BAZIN I will upload one tomorrow!