Individually Address LED Strip

#include <FastLED.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <WiFiClientSecure.h>
#include "certs.h"
#include <LEDStripDriver.h>

// DIN=GPIO16, CIN=GPIO14 
LEDStripDriver led = LEDStripDriver(16, 14);

const char* mqtt_server = "broker.mqttdashboard.com";
char messageBuffer[50];

WiFiClient espClient;
PubSubClient client(espClient);

unsigned long currentTime;
unsigned long startTime;
unsigned long period = 1000;

bool chase = false;

void setup_wifi()
{
  Serial.print("connecting to ");
  Serial.println(ssid);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print(".");
    delay(500);
  }
  Serial.println();
  Serial.print("WiFi connected to ");
  Serial.println(ssid);
  Serial.print("IP address : ");
  Serial.println(WiFi.localIP());
  delay(2000);
}

void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  setup_wifi();
  client.setServer(mqtt_server, 1883);
  client.setCallback(callback);
}

void loop()
{
  if (!client.connected())
  {
    reconnect();
  }
  client.loop();
  if (chase == true)
  {
    RainbowChase();
  }
  else if (chase == false)
  {
    Rainbow();
  }
}

void reconnect()
{
  while (!client.connected())
  {
    if (client.connect("Reception"))
    {
      Serial.println("connected");
      client.subscribe("RGB/Output");
    }
    else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again");
    }
  }
}

void callback(char* topic, byte* payload, unsigned int length)
{
  //Serial.println();
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  Serial.print("length : ");
  Serial.println(length);
  memcpy(messageBuffer, payload, length);
  messageBuffer[length] = '\0';
  Serial.print("the payload is : ");
  Serial.println(messageBuffer);
  if (strcmp(messageBuffer, "on") == 0)
  {
      Serial.print("turning ");
      Serial.println(strcmp(messageBuffer, "on"));
      digitalWrite(LED_BUILTIN, HIGH);
      power = true; //rainbow chase 
  }
  else if (strcmp(messageBuffer, "off") == 0)
  {
      Serial.print("turning ");
      Serial.println(strcmp(messageBuffer, "off"));
      digitalWrite(LED_BUILTIN, LOW);
      power = false;  //stop chasing
    }
  }

void RainbowChase()
{
  //use fast led
}

void Rainbow()
{
  int ledcolor = random(8); //this randomly selects a number between 0 and 7
  currentTime = millis();
  if (currentTime - startTime >= period)
  {
    switch (ledcolor) {
case 0: //red
  led.setColor(255,0,0);
break;
case 1: //green
  led.setColor(0,255,0);
break;
case 2: //blue
  led.setColor(0,0,255);
break;
case 3: //yellow
  led.setColor(255,255,0);
break;
case 4: //cyan
  led.setColor(0,255,255);
break;
case 5: //magenta
  led.setColor(139,0,139);
break;
case 6: //orange
  led.setColor(255,69,0);
break;
case 7: //pink
  led.setColor(255,20,147);
break;
}//rainbow here
    startTime = currentTime;
}
}

Hi guys, I'm trying to make a Chasing effect for RainbowChase(). Not sure how to program as I am using LED Strip Driver.

void loop() {
  theaterChaseRainbow(50);
}

void theaterChaseRainbow(int SpeedDelay) {
  byte *c;
 
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
        for (int i=0; i < NUM_LEDS; i=i+3) {
          c = Wheel( (i+j) % 255);
          setPixel(i+q, *c, *(c+1), *(c+2));    //turn every third pixel on
        }
        showStrip();
       
        delay(SpeedDelay);
       
        for (int i=0; i < NUM_LEDS; i=i+3) {
          setPixel(i+q, 0,0,0);        //turn every third pixel off
        }
    }
  }
}

byte * Wheel(byte WheelPos) {
  static byte c[3];
 
  if(WheelPos < 85) {
   c[0]=WheelPos * 3;
   c[1]=255 - WheelPos * 3;
   c[2]=0;
  } else if(WheelPos < 170) {
   WheelPos -= 85;
   c[0]=255 - WheelPos * 3;
   c[1]=0;
   c[2]=WheelPos * 3;
  } else {
   WheelPos -= 170;
   c[0]=0;
   c[1]=WheelPos * 3;
   c[2]=255 - WheelPos * 3;
  }

  return c;
}

^This chase effect is what I want to integrate into RainbowChase(). Link to the code: https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/

Hey professor_joe, you have made nearly 80 posts now. But you still haven't learned how to ask the forum for help correctly. Where is your schematic? Where are the clickable links to the components you are using? Where are the links to find the libraries you are using?

Schematics: Dropbox - File Deleted

Links to the Libraries :

Components used:
https://shopee.sg/WS2812B-5050-RGB-LED-Strip-1M-30-LED-Individual-Addressable-Stripe-Light-i.7333722.192245168?gclid=Cj0KCQjwuJz3BRDTARIsAMg-HxUR04YsZWtJvR06AG42enmQIYGrl7GKu0_BtUZMS3CtOWyIOhVpvFMaAk17EALw_wcB

https://www.lazada.co.id/products/bayar-ditempat-wemos-d1-mini-4mb-lua-wifi-esp8266-nodemcu-iot-compatible-arduino-ide-dengan-kabel-pengiriman-jakarta-i1232654796-s2035772054.html

https://www.lazada.sg/products/60w-switching-switch-power-supply-driver-for-led-strip-light-dc-12v-5a-i268411622-s417007794.html?exlaz=d_1:mm_150050845_51350205_2010350205::12:1025267241!54483208270!!!pla-297963845945!c!297963845945!417007794!137167855&gclid=Cj0KCQjwuJz3BRDTARIsAMg-HxXb3QERVAUKItREkHvStsBJw0oJaps_uFJG0jD2vl32BrxllOakzfsaAseOEALw_wcB

Thnk you for telling PaulRB. Sorry for the inconvenience.

PaulRB:
clickable links

Zero clickable links. It's one extra click for you! For everyone else, it's careful selecting, copying, opening new tabs, pasting...

Schematics:
Schematics

Links to the Libraries:
LEDStripDriver
FastLED

Components used:
12VStrip
D1 Mini
StepDown12V-5
60WPSU

Professor_Joe:
Schematics:
Schematics

All I can see is


Please attach images to your post as described in the forum guide.

Your schematic makes no sense. It is for a none addressable LED strip, with no detail as to what the LED driver is. The strip has RGB inputs on your diagram, where as that strip you say you are using only has power, ground and data.

The link to the LED strip does not even show the voltage requirement of the strip! So we don't know if it is a 12V strip or a 5V strip. Although the description of "Individual Addressable Stripe" implies 5V, or a very inefficient 12V.
Look the retailers can't even spell strip, never buy stuff from people who have no idea as to what they are selling.

This is a stripe:-

PaulRB:
All I can see is .....
Please attach images to your post as described in the forum guide.

Yes that is because, as you know, it is asking you to sign up to drop box. Fortunately I do have an account with them. Mind you it is not worth the paper it is written on.

Here it is:-

Grumpy_Mike:
Your schematic makes no sense. It is for a none addressable LED strip, with no detail as to what the LED driver is. The strip has RGB inputs on your diagram, where as that strip you say you are using only has power, ground and data.

The link to the LED strip does not even show the voltage requirement of the strip! So we don't know if it is a 12V strip or a 5V strip. Although the description of "Individual Addressable Stripe" implies 5V, or a very inefficient 12V.
Look the retailers can't even spell strip, never buy stuff from people who have no idea as to what they are selling.

This is a stripe:-

it is 12volts, I already bulit the circuit.

srry I missed this component:
Led strip driver

@professor_joe, you do not seem to understand the difference between addressable strips and non-addressable strips. The driver board you posted a link to is not compatible with the strip you posted a link to. Also, the strip you posted the link to is a 5V strip, not 12V.

The driver board will not turn a non-addressable strip into an addressable strip, unless you cut the non-addressable strip into many small sections of 3 LEDs and connect each to a separate driver board. Even if you do, the library for the driver boards you linked to does not appear to support linking more than 1 driver board.

Without an addressable strip, the rainbowChase() pattern is not possible.

The good news is that if you get many of those driver boards and use them to drive many separate sections of your 12V strip, the FastLED library should support this and you will be able to achieve your rainbowChase() pattern.

ok