Help Coding - Different Effects to 2 different LED Strips

I know similar questions have been answered on the interwebs but none related closely enough to my problem for me to solve it on my own since I’m basically INCOMPETENT with C. :frowning:

First off, I have 2 strands of WS2812b LEDs, The first strand is 140 LEDs, the second strand is 82 LEDs.
I’m trying to make it so that the strand of 140 LEDs displays the FastLED “ColorPalette”, and the second strand of 82 LEDs to display “cylon” coming off a different pin on the arduino…
Using an arduino UNO, (atmega328p-pu)
I seriously appreciate any help I can get with this!

Code for the ColorPalette:

#include <FastLED.h>

#define LED_PIN     13
#define NUM_LEDS    140
#define BRIGHTNESS  64
#define LED_TYPE    WS2812b
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];

#define UPDATES_PER_SECOND 100

// This example shows several ways to set up and use 'palettes' of colors
// with FastLED.
//
// These compact palettes provide an easy way to re-colorize your
// animation on the fly, quickly, easily, and with low overhead.
//
// USING palettes is MUCH simpler in practice than in theory, so first just
// run this sketch, and watch the pretty lights as you then read through
// the code.  Although this sketch has eight (or more) different color schemes,
// the entire sketch compiles down to about 6.5K on AVR.
//
// FastLED provides a few pre-configured color palettes, and makes it
// extremely easy to make up your own color schemes with palettes.
//
// Some notes on the more abstract 'theory and practice' of
// FastLED compact palettes are at the bottom of this file.



CRGBPalette16 currentPalette;
TBlendType    currentBlending;

extern CRGBPalette16 myRedWhiteBluePalette;
extern const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM;


void setup() {
    delay( 3000 ); // power-up safety delay
    FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
    FastLED.setBrightness(  BRIGHTNESS );
    
    currentPalette = RainbowColors_p;
    currentBlending = LINEARBLEND;
}


void loop()
{
    ChangePalettePeriodically();
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; /* motion speed */
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}


// There are several different palettes of colors demonstrated here.
//
// FastLED provides several 'preset' palettes: RainbowColors_p, RainbowStripeColors_p,
// OceanColors_p, CloudColors_p, LavaColors_p, ForestColors_p, and PartyColors_p.
//
// Additionally, you can manually define your own color palettes, or you can write
// code that creates color palettes on the fly.  All are shown here.

void ChangePalettePeriodically()
{
    uint8_t secondHand = (millis() / 1000) % 60;
    static uint8_t lastSecond = 99;
    
    if( lastSecond != secondHand) {
        lastSecond = secondHand;
        if( secondHand ==  0)  { currentPalette = RainbowColors_p;         currentBlending = LINEARBLEND; }
        if( secondHand == 10)  { currentPalette = RainbowStripeColors_p;   currentBlending = NOBLEND;  }
        if( secondHand == 15)  { currentPalette = RainbowStripeColors_p;   currentBlending = LINEARBLEND; }
        if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
        if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
        if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
        if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }
        if( secondHand == 40)  { currentPalette = CloudColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 45)  { currentPalette = PartyColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 50)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND;  }
        if( secondHand == 55)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; }
    }
}

// This function fills the palette with totally random colors.
void SetupTotallyRandomPalette()
{
    for( int i = 0; i < 16; i++) {
        currentPalette[i] = CHSV( random8(), 255, random8());
    }
}

// This function sets up a palette of black and white stripes,
// using code.  Since the palette is effectively an array of
// sixteen CRGB colors, the various fill_* functions can be used
// to set them up.
void SetupBlackAndWhiteStripedPalette()
{
    // 'black out' all 16 palette entries...
    fill_solid( currentPalette, 16, CRGB::Black);
    // and set every fourth one to white.
    currentPalette[0] = CRGB::White;
    currentPalette[4] = CRGB::White;
    currentPalette[8] = CRGB::White;
    currentPalette[12] = CRGB::White;
    
}

// This function sets up a palette of purple and green stripes.
void SetupPurpleAndGreenPalette()
{
    CRGB purple = CHSV( HUE_PURPLE, 255, 255);
    CRGB green  = CHSV( HUE_GREEN, 255, 255);
    CRGB black  = CRGB::Black;
    
    currentPalette = CRGBPalette16(
                                   green,  green,  black,  black,
                                   purple, purple, black,  black,
                                   green,  green,  black,  black,
                                   purple, purple, black,  black );
}


// This example shows how to set up a static color palette
// which is stored in PROGMEM (flash), which is almost always more
// plentiful than RAM.  A static PROGMEM palette like this
// takes up 64 bytes of flash.
const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM =
{
    CRGB::Red,
    CRGB::Gray, // 'white' is too bright compared to red and blue
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Red,
    CRGB::Gray,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Blue,
    CRGB::Black,
    CRGB::Black
};

and the code for Cylon:

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 82 

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 2
//#define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
	Serial.begin(57600);
	Serial.println("resetting");
	LEDS.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS);
	LEDS.setBrightness(84);
}

void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } }

void loop() { 
	static uint8_t hue = 0;
	Serial.print("x");
	// First slide the led in one direction
	for(int i = 0; i < NUM_LEDS; i++) {
		// Set the i'th led to red 
		leds[i] = CHSV(hue++, 255, 255);
		// Show the leds
		FastLED.show(); 
		// now that we've shown the leds, reset the i'th led to black
		// leds[i] = CRGB::Black;
		fadeall();
		// Wait a little bit before we loop around and do it again
		delay(10);
	}
	Serial.print("x");

	// Now go in the other direction.  
	for(int i = (NUM_LEDS)-1; i >= 0; i--) {
		// Set the i'th led to red 
		leds[i] = CHSV(hue++, 255, 255);
		// Show the leds
		FastLED.show();
		// now that we've shown the leds, reset the i'th led to black
		// leds[i] = CRGB::Black;
		fadeall();
		// Wait a little bit before we loop around and do it again
		delay(10);
	}
}

Hi, well done for using code tags.

Please post your attempt to merge the two sketches.

Have you considered getting a couple of Nano/Micro clones on eBay and using one for each strip?

Thank you, I’ve done a solid few hours of research on it in total. I found a pretty great writeup on Github

and that helped a bit, I am learning but its VERY slow as I have no teacher or mentor other than the internet and videos don’t help.
The furthest I got in my attempts (which is HARDLY an excuse for an attempt :frowning: )

#include <FastLED.h>

#define LED_PIN     13
#define NUM_LEDS_VerticalStrip 140
#define NUM_LEDS_HorizontalStrip 82
#define BRIGHTNESS  70
#define LED_TYPE    WS2812
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];

#define UPDATES_PER_SECOND 100

// This example shows several ways to set up and use 'palettes' of colors
// with FastLED.
//
// These compact palettes provide an easy way to re-colorize your
// animation on the fly, quickly, easily, and with low overhead.
//
// USING palettes is MUCH simpler in practice than in theory, so first just
// run this sketch, and watch the pretty lights as you then read through
// the code.  Although this sketch has eight (or more) different color schemes,
// the entire sketch compiles down to about 6.5K on AVR.
//
// FastLED provides a few pre-configured color palettes, and makes it
// extremely easy to make up your own color schemes with palettes.
//
// Some notes on the more abstract 'theory and practice' of
// FastLED compact palettes are at the bottom of this file.



CRGBPalette16 currentPalette;
TBlendType    currentBlending;

extern CRGBPalette16 myRedWhiteBluePalette;
extern const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM;


void setup() {
    delay( 3000 ); // power-up safety delay
    FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS_VerticalStrip).setCorrection( TypicalLEDStrip );
    FastLED.setBrightness(  BRIGHTNESS );
    
    currentPalette = RainbowColors_p;
    currentBlending = LINEARBLEND;
}

void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } }

void loop()
{
    ChangePalettePeriodically();
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; /* motion speed */
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.show();
    FastLED.delay(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUM_LEDS_VerticalStrip; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}


void ChangePalettePeriodically()
{
    uint8_t secondHand = (millis() / 1000) % 60;
    static uint8_t lastSecond = 99;
    
    if( lastSecond != secondHand) {
        lastSecond = secondHand;
        if( secondHand ==  0)  { currentPalette = RainbowColors_p;         currentBlending = LINEARBLEND; }
        if( secondHand == 10)  { currentPalette = RainbowStripeColors_p;   currentBlending = NOBLEND;  }
        if( secondHand == 15)  { currentPalette = RainbowStripeColors_p;   currentBlending = LINEARBLEND; }
        if( secondHand == 20)  { SetupPurpleAndGreenPalette();             currentBlending = LINEARBLEND; }
        if( secondHand == 25)  { SetupTotallyRandomPalette();              currentBlending = LINEARBLEND; }
        if( secondHand == 30)  { SetupBlackAndWhiteStripedPalette();       currentBlending = NOBLEND; }
        if( secondHand == 35)  { SetupBlackAndWhiteStripedPalette();       currentBlending = LINEARBLEND; }
        if( secondHand == 40)  { currentPalette = CloudColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 45)  { currentPalette = PartyColors_p;           currentBlending = LINEARBLEND; }
        if( secondHand == 50)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = NOBLEND;  }
        if( secondHand == 55)  { currentPalette = myRedWhiteBluePalette_p; currentBlending = LINEARBLEND; }
    }
}

// This function fills the palette with totally random colors.
void SetupTotallyRandomPalette()
{
    for( int i = 0; i < 16; i++) {
        currentPalette[i] = CHSV( random8(), 255, random8());
    }
}

// This function sets up a palette of black and white stripes,
// using code.  Since the palette is effectively an array of
// sixteen CRGB colors, the various fill_* functions can be used
// to set them up.
void SetupBlackAndWhiteStripedPalette()
{
    // 'black out' all 16 palette entries...
    fill_solid( currentPalette, 16, CRGB::Black);
    // and set every fourth one to white.
    currentPalette[0] = CRGB::White;
    currentPalette[4] = CRGB::White;
    currentPalette[8] = CRGB::White;
    currentPalette[12] = CRGB::White;
    
}

// This function sets up a palette of purple and green stripes.
void SetupPurpleAndGreenPalette()
{
    CRGB purple = CHSV( HUE_PURPLE, 255, 255);
    CRGB green  = CHSV( HUE_GREEN, 255, 255);
    CRGB black  = CRGB::Black;
    
    currentPalette = CRGBPalette16(
                                   green,  green,  black,  black,
                                   purple, purple, black,  black,
                                   green,  green,  black,  black,
                                   purple, purple, black,  black );
}


// This example shows how to set up a static color palette
// which is stored in PROGMEM (flash), which is almost always more
// plentiful than RAM.  A static PROGMEM palette like this
// takes up 64 bytes of flash.
const TProgmemPalette16 myRedWhiteBluePalette_p PROGMEM =
{
    CRGB::Red,
    CRGB::Gray, // 'white' is too bright compared to red and blue
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Black,
    
    CRGB::Red,
    CRGB::Red,
    CRGB::Gray,
    CRGB::Gray,
    CRGB::Blue,
    CRGB::Blue,
    CRGB::Black,
    CRGB::Black
};

// I HAVE NO IDEA WHERE TO PUT THE CYLON CODE
//
//void loop() { 
//  static uint8_t hue = 0;
//  Serial.print("x");
  // First slide the led in one direction
//  for(int i = 0; i < NUM_LEDS; i++) {
    // Set the i'th led to red 
//    leds[i] = CHSV(hue++, 255, 255);
    // Show the leds
//    FastLED.show(); 
    // now that we've shown the leds, reset the i'th led to black
    // leds[i] = CRGB::Black;
//    fadeall();
    // Wait a little bit before we loop around and do it again
//    delay(10);
  }
//  Serial.print("x");

  // Now go in the other direction.  
//  for(int i = (NUM_LEDS)-1; i >= 0; i--) {
    // Set the i'th led to red 
//    leds[i] = CHSV(hue++, 255, 255);
    // Show the leds
//    FastLED.show();
    // now that we've shown the leds, reset the i'th led to black
    // leds[i] = CRGB::Black;
    fadeall();
    // Wait a little bit before we loop around and do it again
//    delay(10);
//  }
//}

Nothing I've read addresses anything related to outputting different (functions?) to different pins How do I tell it which bits of code to spit out of which pin? Where in the loop do I put the Cylon code? Is this even possible or do I actually have to use separate atmega controllers? Lastly, can someone give me some sort of direction on where to find a competent C curriculum so I don't have to rely on asking people on forums? lol

Here I showed how to run 2 different animations on one strip at the same time.

Here you find informations, how to handle multiple strips.

I suggest to use multiple CRGB arrays. You render your animations into different arrays and later send those arrays to different pins.

Keep in mind that you need to call FastLED.show(); just once in the main loop. It will update all connected strips with just one call.

Yes, it is possible but will require some re-coding. Both the original sketches were written to be “stand-alone” and not to be integrated with other code. The tell-tale sign of that is use of long delay() functions, especially inside loops.

I suggest you look at reviews on Amazon for C/C++ coding books. But they won’t tell you everything you need to understand to get this working. Most C/C++ books are written with the expectation you will be using a multi-threaded, multi-processor environment like a PC, so having multiple processes running independently is easy. But Arduino is single processor single thread, so you have to adopt a different approach. The classic example of this is called “blink without delay”.

Nothing I’ve read addresses anything related to outputting different (functions?) to different pins

Well the MultipleStripsInOneArray example in the FastLED libiary does just that.

Is this even possible or do I actually have to use separate atmega controllers?

Yes it is possible but what you have to do is to rewrite the code as a state machine.

I don’t use the FastLED libiary much, I prefer to use the AdaFruit libiary. What I have written here is a simplified example of using a state machine for two LED animations at the same time. The simplification makes the code a bit turgid but it is easier to follow for a beginner. The two animations are very similar just a walking red or green LED going at different speeds, change them to something more exciting.

// using a state machine to drive two patterns on two strings at the same time
// By Mike Cook July 2017

#define PIN_FOR_1   6 // pin connected to the NeoPixels 4 meter strip
#define PIN_FOR_2   7 // pin connected to the small NeoPixels strip
#define NUMPIXELS1      5 // number of LEDs on first strip
#define NUMPIXELS2      6 // number of LEDs on second strip

#include <Adafruit_NeoPixel.h>

// how often each pattern updates
unsigned long pattern1Interval  = 400;
unsigned long pattern2Interval  = 900;
// for millis() when last update occurred
long lastUpdateP1 = 0;
long lastUpdateP2 = 0;  
// state variables for patterns
int p1State = 0 ; 
int p2State = 0 ; 

Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(NUMPIXELS1, PIN_FOR_1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(NUMPIXELS2, PIN_FOR_2, NEO_GRB + NEO_KHZ800);

void setup() {
   strip1.begin(); // This initializes the NeoPixel library for pattern 1.
   strip2.begin(); // This initializes the NeoPixel library for pattern 2.
   // wipes the LED buffers
   wipe1(0,0,0); 
   wipe2(0,0,0);
}

void loop(){
if(millis() - lastUpdateP1 > pattern1Interval) updatePattern1();
if(millis() - lastUpdateP2 > pattern2Interval) updatePattern2();
}

void updatePattern1(){ // update pattern 1 a walking red led
   strip1.setPixelColor(p1State, strip1.Color(128,0,0));
   int lastLed = p1State -1;
   if (lastLed < 0) { // wrap round count
      lastLed = NUMPIXELS1 -1;
   }
   strip1.setPixelColor(lastLed, strip1.Color(0,0,0)); // turn off last LED
   p1State ++; // move on state variable for the next time we enter this
   if(p1State >= NUMPIXELS1){ // wrap round the state
    p1State = 0;
   }
   strip1.show(); // update display
   lastUpdateP1 = millis(); // time for next update
}

void updatePattern2(){ // update pattern 2 a walking green LED
   strip2.setPixelColor(p2State, strip2.Color(0,128,0));
   int lastLed = p2State -1;
   if (lastLed < 0) { // wrap round count
      lastLed = NUMPIXELS2 -1;
   }
   strip2.setPixelColor(lastLed, strip2.Color(0,0,0)); // turn off last LED
   p2State ++; // move on state variable for the next time we enter this
   if(p2State >= NUMPIXELS2){ // wrap round the state
    p2State = 0;
   }
   strip2.show(); // update display
   lastUpdateP2 = millis(); // time for next update
}

void wipe1(byte r,byte g, byte b){
     for(int i=0;i<NUMPIXELS1;i++){
       strip1.setPixelColor(i, strip1.Color(r,g,b)); 
       }
}

void wipe2(byte r,byte g, byte b){
     for(int i=0;i<NUMPIXELS2;i++){
       strip2.setPixelColor(i, strip2.Color(r,g,b)); 
       }
}

When writing any pattern as a state machine you can not use the delay function and you can not use for loops that contain a show method. On each show / delay you end the pattern change function. Maybe pattern update would be a better name for it.

Basically you have two problems, driving two strips and converting your pattern into a state machine. Hopefully this will solve your first one.

can someone give me some sort of direction on where to find a competent C curriculum

The problem is that most C courses concentrate on the commands and syntax and have little to do with physical computing, which is what you are doing here. Getting the concept of a state machine in your head will stand you in good stead for a future in physical computing.

Protip: Never use any delay in led animations.

Have all parameters based on millis(). Sideeffect: It runs with the same seen speed at all setups. The animation becomes independent from the framerate you get.

The only valid reason for a delay in a FastLED animation is to limit the framerate for WS2812 to <400 fps to avoid glitching.

A very short and simple example how it could look when using FastLED. Change the setup part according to your hardware and wiring.
The code allows you to see 2 independent animations on 2 different strips connected to 2 different pins.

#include "FastLED.h"

// this is the number of leds per single strip
#define NUM_LEDS 50

// have 2 independent CRGBs 

CRGB leds2[NUM_LEDS];
CRGB leds3[NUM_LEDS];

void setup() {
  
  FastLED.addLeds<NEOPIXEL, 10>(leds2, NUM_LEDS);
  FastLED.addLeds<NEOPIXEL, 11>(leds3, NUM_LEDS);
  

  LEDS.setBrightness(128);
}

void loop() {
  
  // render the first animation into leds2 
  animationA();
  
  // render the second animation into leds3
  animationB();

  
  FastLED.show();
}

void animationA() {
  // running red stripes 
  for (uint16_t i = 0; i < NUM_LEDS; i++) {
    uint8_t red = (millis() / 3) + (i * 5);
    if (red > 128) red = 0;
    leds2[i] = CRGB(red, 0, 0);
  }
}

void animationB() {
  // the moving rainbow
  for (uint16_t i = 0; i < NUM_LEDS; i++) {
    leds3[i] = CHSV((millis() / 4) - (i * 3), 255, 255);
  }
}

Just came across this code, I had forgotten I wrote it. It is basically all the FastLED demo code rewritten as state machines. The program was to allow you to run each pattern on a separate line of an LED matrix using an array of APA102 LEDs, so this one uses just one long LED strip but runs different patterns on different segment of the strip.

// Multiple patterns in a state machine format
// using the FastLED libiary
// by Mike Cook 2017

#include "FastLED.h"

// first set up the parameters to use in the pattern calling
unsigned long patternInterval [] = { 500, 40, 20, 200, 5 }; // how often each pattern updates
unsigned long lastUpdate [5] ;  // for millis() when last update occoured
boolean patternEnabled [] = {true,true,false,true,true}; // should the pattern be called at all
byte patternState[5]; // state machine variable for patterns - this initilises them to zero

// now set up the LEDs to use
#define NUM_LEDS 64
#define DATA_PIN 11
#define CLOCK_PIN 13


CRGB leds[NUM_LEDS];

// Constants for patterns
// for Fire2012
#define COOLING  20
#define SPARKING 50
#define COLOR_ORDER BGR

// now set up the array of pointers to each pattern
void (*patternPtrs[5])(int index,byte state); //the array of pattern pointers

void setup() {
  //initialises the array of pattern pointers
  patternPtrs[0] = blinkOne; 
  patternPtrs[1] = cylon;
  patternPtrs[2] = fire;
  patternPtrs[3] = colorWipe;
  patternPtrs[4] = rainbowCycle;
  //initialises the FastLED driver you want
  //FastLED.addLeds<APA102,leds, NUM_LEDS); // 13 clock  and 11 data
  FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS); // 13 clock  and 11 data
  FastLED.setBrightness(8);
}

void loop() {
  for(int i = 0; i<5; i++) { // go through all the patterns and see if it is time to call one
    if(patternEnabled[i] && millis() - lastUpdate[i] > patternInterval[i]){
      lastUpdate[i] = millis();
      callPatterns(i, patternState[i]);
    }
  }
}

void callPatterns(int index, byte state) {
  (*patternPtrs[index])(index,state); //calls the pattern at the index of `index` in the array
}

// These are the pattern functions written as a state machine
// this is the Blink program in FastLED's example folder
void blinkOne(int index,byte state) {
  if(state == 0){
    leds[3] = CRGB::Blue;
    FastLED.show();
    patternState[index] = 1; // move on the state machine for the next call
  }
  if(state == 1){
     leds[3] = CRGB::Black;
     FastLED.show();
     patternState[index] = 0;
   }
  }

// this is the Cylon program in FastLED's example folder
// we will use LEDs 8 to 15 to show this
void cylon(int index,byte state) {
  static int i = 8; // replaces the loop index
  if(state == 0){
    leds[i] = CRGB::Red;
    FastLED.show();
    patternState[index] = 1; // move on the state machine for the next call
  }
   if(state == 1){
    // now that we've shown the leds, reset the i'th led to black
    leds[i] = CRGB::Black;
    i++; // increment what was the loop variable
    if(i >= 16){ // we have finished one direction
     patternState[index] = 2;
     i--;
    }
    else {
    patternState[index] = 0;
    }
   }
   // Now go in the other direction only green
   if(state == 2){
     leds[i] = CRGB::Green;
    FastLED.show();
    patternState[index] = 3; // move on the state machine for the next call
   }
  if(state == 3){
    // now that we've shown the leds, reset the i'th led to black
    leds[i] = CRGB::Black;
    i--; // decrement what was the loop variable
    if(i < 8){ // we have finished the return, go back to the start
     patternState[index] = 0;
     i= 8; // ready to start again
    }
    else {
    patternState[index] = 2;
    } 
    // note that this could be better implemented but it has been written like this to keep it close to the original example
    // so you can see what changes have been made 
  }
}

// this is the Fire2012 program in FastLED's example folder
void fire(int index,byte state) {
// using LEDs 16 to 32
// Array of temperature readings at each simulation cell
  const byte startLED = 16; // first LED in section
  const byte numLEDs = 16;
  static byte heat[numLEDs];

  random16_add_entropy( random());
  // Step 1.  Cool down every cell a little
    for( int i = 0; i < numLEDs; i++) {
      heat[i] = qsub8( heat[i],  random8(0, ((COOLING * 10) / NUM_LEDS) + 2));
    }
  
    // Step 2.  Heat from each cell drifts 'up' and diffuses a little
    for( int k= numLEDs - 1; k >= 2; k--) {
      heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;
    }
    
    // Step 3.  Randomly ignite new 'sparks' of heat near the bottom
    if( random8() < SPARKING ) {
      int y = random8(7);
      heat[y] = qadd8( heat[y], random8(160,255) );
    }

    // Step 4.  Map from heat cells to LED colors
    for( int j = 0; j < numLEDs; j++) {
        leds[j+startLED] = HeatColor( heat[j]); // transfer heat array to LEDs
    }
    FastLED.show(); // display this frame
  }

//colorWipe  modified from Adafruit example to make it a state machine
// uses LEDs 32 to 40
void colorWipe(int index,byte state) {
  static int i =0; // used as state variable
  static byte firstLED = 32;
  static byte numLEDs = 8;
    leds[i+firstLED] = CRGB::Yellow;
    FastLED.show();
    i++;
  if(i >= numLEDs){
    i = 0;
    for(int j;j<numLEDs; j++) leds[j+firstLED] = CRGB::Black; // blank out strip
  }
}

 // rainbowCycle modified from Adafruit example to make it a state machine
 // uses LEDs 48 to 64
void rainbowCycle(int index,byte state) {
  static uint16_t j=0; // used as state variable
  static byte firstLED = 48;
  static byte numLEDs = 16;
    for(int i=0; i< numLEDs; i++) {
      leds[i+firstLED].setHSV( (((i * 256 / numLEDs) + j) & 255), 255, 255);
    }
    FastLED.show();
    j++;
    if(j >= 256*5) j=0;
}

Thanks guys, I'll do my best to attempt this, but seriously I really have no real idea what I'm doing lol
I might just use one or the other or sacrifice another 328p

I am so in over my head… :neutral_face:

I gave it my best shot.

#include <bitswap.h>
#include <chipsets.h>
#include <FastLED.h>
#include <Adafruit_NeoPixel.h>

// using a state machine to drive two patterns on two strings at the same time
// By Mike Cook July 2017

#define PIN_FOR_1   13 // pin connected to the Larger strip
#define PIN_FOR_2   12 // pin connected to the smaller strip
#define NUMPIXELS1      140 // number of LEDs on first (larger) strip
#define NUMPIXELS2      82 // number of LEDs on second (smaller) strip
#define BRIGHTNESS  70
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];

// how often each pattern updates
unsigned long pattern1Interval  = 400;
unsigned long pattern2Interval  = 900;

// for millis() when last update occurred
long lastUpdateP1 = 0;
long lastUpdateP2 = 0;  

// state variables for patterns
int p1State = 0 ; 
int p2State = 0 ; 

Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(NUMPIXELS1, PIN_FOR_1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(NUMPIXELS2, PIN_FOR_2, NEO_GRB + NEO_KHZ800);

void setup() {
   
   strip1.begin(){ // This initializes the NeoPixel library for pattern 1.
    delay( 3000 ); // power-up safety delay
    FastLED.addLeds<LED_TYPE, PIN_FOR_1, COLOR_ORDER>(leds, NUMPIXELS1).setCorrection( TypicalLEDStrip );
    FastLED.setBrightness(  BRIGHTNESS );

    currentPalette = RainbowColors_p;
    currentBlending = LINEARBLEND;

    void fadeall() { for(int i = 0; i < NUMPIXELS1; i++) { leds[i].nscale8(250); } }   //this can't be in the right spot....
   }
   
   strip2.begin(){ // This initializes the NeoPixel library for pattern 2.
    delay( 3000 ); // power-up safety delay
    Serial.println("resetting");
    LEDS.addLeds<WS2812,PIN_FOR_2,RGB>(leds,NUMPIXELS2);
    FastLED.setBrightness(  BRIGHTNESS );

    void fadeall() { for(int i = 0; i < NUMPIXELS2; i++) { leds[i].nscale8(250); } }  //this can't be in the right spot....
   }
   // wipes the LED buffers
   wipe1(0,0,0); 
   wipe2(0,0,0);
}

void loop(){
if(millis() - lastUpdateP1 > pattern1Interval) updatePattern1();   //Add anything here?
if(millis() - lastUpdateP2 > pattern2Interval) updatePattern2();   //or here?
}

void updatePattern1(){ // update pattern 1 a walking red led
    ChangePalettePeriodically();
    
    static uint8_t startIndex = 0;
    startIndex = startIndex + 1; /* motion speed */
    
    FillLEDsFromPaletteColors( startIndex);
    
    FastLED.update(1000 / UPDATES_PER_SECOND);
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
    uint8_t brightness = 255;
    
    for( int i = 0; i < NUMPIXELS1; i++) {
        leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
        colorIndex += 3;
    }
}
   
   
   int lastLed = p1State -1;
   if (lastLed < 0) { // wrap round count
      lastLed = NUMPIXELS1 -1;
   }
   strip1.setPixelColor(lastLed, strip1.Color(0,0,0)); // turn off last LED
   p1State ++; // move on state variable for the next time we enter this
   if(p1State >= NUMPIXELS1){ // wrap round the state
    p1State = 0;
   }
   strip1.show(); // update display
   lastUpdateP1 = millis(); // time for next update
}

void updatePattern2(){ // update pattern 2 a walking green LED
   static uint8_t hue = 0;
   Serial.print("x");
   // First slide the led in one direction
   for(int i = 0; i < NUMPIXELS2; i++) {
    // Set the i'th led to red 
    leds[i] = CHSV(hue++, 255, 255);
    // Show the leds
    FastLED.update(); 
    // now that we've shown the leds, reset the i'th led to black
    // leds[i] = CRGB::Black;
    fadeall();
    // Wait a little bit before we loop around and do it again
    delay(10);   
   
   int lastLed = p2State -1;
   if (lastLed < 0) { // wrap round count
      lastLed = NUMPIXELS2 -1;
   }
   
   strip2.setPixelColor(lastLed, strip2.Color(0,0,0)); // turn off last LED
   p2State ++; // move on state variable for the next time we enter this
   if(p2State >= NUMPIXELS2){ // wrap round the state
    p2State = 0;
   }
   strip2.show(); // update display
   lastUpdateP2 = millis(); // time for next update
}

void wipe1(byte r,byte g, byte b){
     for(int i=0;i<NUMPIXELS1;i++){
       strip1.setPixelColor(i, strip1.Color(r,g,b)); 
       }
}

void wipe2(byte r,byte g, byte b){
     for(int i=0;i<NUMPIXELS2;i++){
       strip2.setPixelColor(i, strip2.Color(r,g,b)); 
       }
}

I gave it my best shot.

Please read this:-
How to use this forum
It will tell you how to respond to answers.

Basically if you are posting code you need to say what it does and what you expect it to do. Or ask about the things you don't understand. Your responce as it stands gives us nothing to go on.

I have read the pinned post. I assumed the previous replies implied what I was attempting.
I attempted to incorporate Helmuth's suggestions on state machines, into my combined sketch. I know there are probably huge parts that are wrong and was hoping for a few more tips or pointers on my errors.

I assumed the previous replies implied what I was attempting.

We know exactly what you are attempting. You posted code whith no comment about what it does. Are we supposed to guess what it does or read the code and try and deduce what it does.

It is like presenting your body to a doctor with no comments as to what you think is wrong or what you feel. If you do that the doctor is going to ask you what? You saying "I want to be healthy" is not going to cut it. The same here. You post code and?
Does it compile?
Does it run but no LEDs light up?
Dose one pattern work but not the other?

Just what?