how would i do multi flames on a Flame2012 script?

how would i do multi flames on a Flame2012 script? i know ive asked before but i cant find the posts sorry

i think if i just edit the MultiArrays code with the fire2012 ill be good right?

Hi @Brett_Hansen ,

Here’s my adaptation of Mark’s FIre2012 code…

It have 6 strings of 25 WS2812b LED running from separate pins of a Arduino Uno.

Note that I removed all the original comments to simplify the cut and paste to this post:

#include <FastLED.h>
#define NUM_STRIPS 6
#define NUM_LEDS_PER_STRIP 25
#define BRIGHTNESS 64
#define FRAMES_PER_SECOND 100
CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];
static byte heat[NUM_STRIPS][NUM_LEDS_PER_STRIP]; // Array of temperature readings at each simulation cell
#define COOLING 85
#define SPARKING 120
CRGBPalette16 gPal;
void setup() {
FastLED.addLeds<NEOPIXEL, 8>(leds[0], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 22
FastLED.addLeds<NEOPIXEL, 9>(leds[1], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 24
FastLED.addLeds<NEOPIXEL, 10>(leds[2], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 26
FastLED.addLeds<NEOPIXEL, 11>(leds[3], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 28
FastLED.addLeds<NEOPIXEL, 12>(leds[4], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 28
FastLED.addLeds<NEOPIXEL, 13>(leds[5], NUM_LEDS_PER_STRIP); // tell FastLED there’s 25 WS2812 LEDs on pin 28

FastLED.setBrightness( BRIGHTNESS );
gPal = CRGBPalette16( CRGB::Black, CRGB::Red, CRGB::Yellow, CRGB::DimGray); // DimGray = 696969 Gray=808080 DarkGray=A9A9A9 LightGray=D3D3D3

}
void loop()
{

random16_add_entropy( random());

Fire2012WithPalette(); // run simulation frame, using palette colors
FastLED.show(); // display this frame
FastLED.delay(1000 / FRAMES_PER_SECOND);
}

void Fire2012WithPalette(){

for( int strip = 0; strip < NUM_STRIPS; strip++) {
for( int i = 0; i < NUM_LEDS_PER_STRIP; i++) { // Step 1. Cool down every cell a little
heat[strip][i] = qsub8( heat[strip][i], random8(0, ((COOLING * 10) / NUM_LEDS_PER_STRIP) + 2));
}

for( int k= NUM_LEDS_PER_STRIP - 1; k >= 2; k--) {                      // Step 2.  Heat from each cell drifts 'up' and diffuses a little
  heat[strip][k] = (heat[strip][k - 1] + heat[strip][k - 2] + heat[strip][k - 2] ) / 3;
}

if( random8() < SPARKING ) {                                  // Step 3.  Randomly ignite new 'sparks' of heat near the bottom
  int y = random8(7);
  heat[strip][y] = qadd8( heat[strip][y], random8(160,255) );
}

for( int j = 0; j < NUM_LEDS_PER_STRIP; j++) {                          // Step 4.  Map from heat cells to LED colors
  byte colorindex = scale8( heat[strip][j], 240);                    // Scale the heat value from 0-255 down to 0-240 for best results with color palettes.
  leds[strip][j] = ColorFromPalette( gPal, colorindex);
}

}
}

Are all strips showing the same pattern, or is it the same effect with different pattern?

@MAX_Menke They are the same effect but different patterns.

Each strip use separate data based on separate random numbers. With the strips side-by-side, you can see randomly different flame heights on each strip.