led stairs diy project help needed

hi there Im just new to coding but try my best.Im currently working on led stairs project want to change look of my house.I got ws2812b strips all connected and working fine,pir sensor up and downstairs all good.downloaded code from instructables made by (snikogos) simply modify to work with my stairs,all work perfect. but Im try to push that project bit forward and add few nice effect to it like rainbow,etc.but Im stuck all Im try to do end up with errors spending lot time and still nothing. need samone who could help me with that code.try to change warm white color with rainbow effect.and try to chenge breathing with dot chasing ;got 2 codes try to add them but still no luck

FastLED.clear();

for(int i=0;i<NUM_LEDS;i++){ that one for breathing
leds*.setRGB(0 ,255 ,0);*

  • FastLED.show();*
  • delay(20);*
  • for(int i=0; i<NUM_LEDS;i++){ that one to replace warm white*
  • fill_rainbow(leds,i, 0, 5);*
  • FastLED.show();*

```
*#include <Adafruit_NeoPixel.h>

#define PIN 6

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//  NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//  NEO_KHZ400  400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)
//  NEO_GRB    Pixels are wired for GRB bitstream (most NeoPixel products)
//  NEO_RGB    Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)

Adafruit_NeoPixel strip = Adafruit_NeoPixel(286, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel’s data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit…if you must, connect GND first.

// Set up Variables
unsigned long timeOut=60000; // timestamp to remember when the PIR was triggered.
int downUp = 0;              // variable to rememer the direction of travel up or down the stairs
int alarmPinTop = 10;        // PIR at the top of the stairs
int alarmPinBottom =11;      // PIR at the bottom of the stairs
int alarmValueTop = LOW;    // Variable to hold the PIR status
int alarmValueBottom = LOW; // Variable to hold the PIR status
int ledPin = 13;          // LED on the arduino board flashes when PIR activated
int LDRSensor = A0;        // Light dependant resistor
int LDRValue = 0;          // Variable to hold the LDR value
int colourArray[350];      // An array to hold RGB values
int change = 1;            // used in ‘breathing’ the LED’s
int breathe = 0;          // used in ‘breathing’ the LED’s

void setup() {
  strip.begin();
  strip.setBrightness(80); //adjust brightness here
  strip.show(); // Initialize all pixels to ‘off’
  Serial.begin (9600);  // only requred for debugging
  pinMode(ledPin, OUTPUT);  // initilise the onboard pin 13 LED as an indicator
  pinMode(alarmPinTop, INPUT_PULLUP);    // for PIR at top of stairs initialise the input pin and use the internal restistor
  pinMode(alarmPinBottom, INPUT_PULLUP);  // for PIR at bottom of stairs initialise the input pin and use the internal restistor
  delay (2000); // it takes the sensor 2 seconds to scan the area around it before it can
  //detect infrared presence.

}

void loop() {

if (timeOut+15700 < millis()) {        // idle state - ‘breathe’ the top and bottom LED to show program is looping
      uint32_t blue = (0, 0, breathe);
      breathe = breathe + change;
      strip.setPixelColor(0, blue);
      strip.setPixelColor(21, blue);
      strip.setPixelColor(22, blue);
      strip.setPixelColor(43, blue);
      strip.setPixelColor(44, blue);
      strip.setPixelColor(65, blue);
      strip.setPixelColor(66, blue);
      strip.setPixelColor(87, blue);
      strip.setPixelColor(88, blue);
      strip.setPixelColor(109, blue);
      strip.setPixelColor(110, blue);
      strip.setPixelColor(131, blue);
      strip.setPixelColor(132, blue);
      strip.setPixelColor(153, blue);
      strip.setPixelColor(154, blue);
      strip.setPixelColor(175, blue);
      strip.setPixelColor(176, blue);
      strip.setPixelColor(197, blue);
      strip.setPixelColor(198, blue);
      strip.setPixelColor(219, blue);
      strip.setPixelColor(220, blue);
      strip.setPixelColor(241, blue);
      strip.setPixelColor(242, blue);
      strip.setPixelColor(263, blue);
      strip.setPixelColor(264, blue);
      strip.setPixelColor(285, blue);
      strip.show();
      if (breathe == 100 || breathe == 0) change = -change;      // breathe the LED from 0 = off to 100 = fairly bright
      if (breathe == 100 || breathe == 0); delay (100);          // Pause at beginning and end of each breath
      delay(10);

}
 
    alarmValueTop = digitalRead(alarmPinTop);    // Constantly poll the PIR at the top of the stairs
    //Serial.println(alarmPinTop);
    alarmValueBottom = digitalRead(alarmPinBottom);  // Constantly poll the PIR at the bottom of the stairs
    //Serial.println(alarmPinBottom);
   
    if (alarmValueTop == HIGH && downUp != 2)  {      // the 2nd term allows timeOut to be contantly reset if one lingers at the top of the stairs before decending but will not allow the bottom PIR to reset timeOut as you decend past it.
      timeOut=millis();  // Timestamp when the PIR is triggered.  The LED cycle wil then start.
      downUp = 1;
      //clearStrip();
      topdown();        // lights up the strip from top down
    }

if (alarmValueBottom == HIGH && downUp != 1)  {    // the 2nd term allows timeOut to be contantly reset if one lingers at the bottom of the stairs before decending but will not allow the top PIR to reset timeOut as you decend past it.
      timeOut=millis();    // Timestamp when the PIR is triggered.  The LED cycle wil then start.
      downUp = 2;
      //clearStrip();
      bottomup();        // lights up the strip from bottom up
    }

if (timeOut+10000 < millis() && timeOut+15000 < millis()) {    //switch off LED’s in the direction of travel.
      if (downUp == 1) {
          colourWipeDown(strip.Color(0, 0, 0), 100); // Off
      }
      if (downUp == 2)  {
        colourWipeUp(strip.Color(0, 0, 0), 100);  // Off
      }
      downUp = 0;
     
    }

}

void topdown() {
    Serial.println (“detected top”);                  // Helpful debug message
    colourWipeDown(strip.Color(255, 255, 250), 25 );  // Warm White
    //for(int i=0; i<3; i++) {                        // Helpful debug indication flashes led on Arduino board twice
      //digitalWrite(ledPin,HIGH);
      //delay(200);
      //digitalWrite(ledPin,LOW);
      //delay(200);
    //}
}

void bottomup() {
    Serial.println (“detected bottom”);            // Helpful debug message
    colourWipeUp(strip.Color(255, 255, 250), 25);  // Warm White
    //for(int i=0; i<3; i++) {                    // Helpful debug indication flashes led on Arduino board twice
      //digitalWrite(ledPin,HIGH);
      //delay(200);
      //digitalWrite(ledPin,LOW);
      //delay(200);
    //}
  }

// Fade light each step strip
void colourWipeDown(uint32_t c, uint16_t wait) {

for (uint16_t j = 0; j < 13; j++){
  int start = strip.numPixels()/13 *j;
  Serial.println(j);
   
        for (uint16_t i = start; i < start + 22; i++){
  strip.setPixelColor(i, c);
        }
    strip.show(); 
  delay(wait);
  }

}

void clearStrip(){
  for (int l=0; l<strip.numPixels(); l++){
    strip.setPixelColor(l, (0,0,0));
  }
     
}
// Fade light each step strip
void colourWipeUp(uint32_t c, uint16_t wait) {
  for (uint16_t j = 13; j > 0; j–){
  int start = strip.numPixels()/13 j;
  Serial.println(j);
      //start = start-1;
          for (uint16_t i = start; i > start - 22; i–){
        strip.setPixelColor(i-1, c);
        }
          strip.show();
  delay(wait);
  } 
 
}

```
F8T0II8ILCN9NJ9.ino (7.06 KB)

You did not use code tags when posting your code so most of it has been changed into italics and made meaningless

Please look at Read this before posting a programming question and follow the instructions on how to post code