Hi Everyone,
I am looking for help how to create a some sort of “slow glowing fire” patter (I am not sure how to describe it better) for my Living Room COB LED strip. The strip is 24V COB type with only 100 pixels (12 RGB LEDs per pixel). Strip is mounted on the wall right below ceiling. There are 7 artificial segments. 5 wave shaped segments in a middle have 16 pixels and 2 side segments have 10 pixels.
Here is a picture how it looks like (ceiling is right above the strip).
Currently it runs very simple pattern which creates ether colored static segments (please check the picture) or single color for the entire strip. Just in case here is a code:
// Common R, G, B vallues
export var Rc = 1
export var Gc = 0.5
export var Bc = 0
export var enableColor = 1
// Staring Index of each LED Segment
Seg_1 = 0
Seg_2 = 9
Seg_3 = 25
Seg_4 = 41
Seg_5 = 57
Seg_6 = 73
Seg_7 = 89
Seg_8 = 100
// Segment Colors
R1 = 0
G1 = 1
B1 = 1
R2 = 1
G2 = 0.15
B2 = 0
R3 = 0.3
G3 = 1
B3 = 0
R4 = 1
G4 = 0
B4 = 1
R5 = 1
G5 = 0.1
B5 = 0.3
R6 = 0
G6 = 1
B6 = 1
R7 = 1
G7 = 0.15
B7 = 0
R8 = Rc
G8 = Gc
B8 = Bc
/*
export function beforeRender(delta)
{
}
*/
export function render(index)
{
if (false == enableColor)
{
R = Rc
G = Gc
B = Bc
}
else if ((index >= Seg_1) && (index < Seg_2))
{
R = R1
G = G1
B = B1
}
else if ((index >= Seg_2) && (index < Seg_3))
{
R = R2
G = G2
B = B2
}
else if ((index >= Seg_3) && (index < Seg_4))
{
R = R3
G = G3
B = B3
}
else if ((index >= Seg_4) && (index < Seg_5))
{
R = R4
G = G4
B = B4
}
else if ((index >= Seg_5) && (index < Seg_6))
{
R = R5
G = G5
B = B5
}
else if ((index >= Seg_6) && (index < Seg_7))
{
R = R6
G = G6
B = B6
}
else if ((index >= Seg_7) && (index < Seg_8))
{
R = R7
G = G7
B = B7
}
else
{
R = Rc
G = Gc
B = Bc
}
rgb(R, G, B)
}
My wife asked if we can have a “slow glowing fire” effect for this strip. I am 100% sure this is possible but I don’t know how to create it. Any help is very welcome.
Thank you and Happy Holidays,
- Vitaliy