1Pin to control crystal chamber and accents leds

I have a problem.

How can I program a single line of RGBW LEDs connected to a single pin to make some of them react differently?

Below is my code. PB says I have a blade error

i only change this line:
SubBlade(0,30,WS281XBladePtr<42, blade4Pin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >()),
SubBlade(30, 42, NULL)

the code:

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 6
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 291.6666666666667;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define SHARED_POWER_PINS
#define BLADE_DETECT_PIN 17
#define ENABLE_SERIAL
#define ENABLE_SSD1306
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
    StyleNormalPtr<CYAN, WHITE, 300, 800>(),
    StyleNormalPtr<GREEN, WHITE, 300, 800>(), "cyan"},
{ "SmthJedi", "tracks/mars.wav",
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
StylePtr<InOutSparkTip<EASYBLADE(GREEN, WHITE), 300, 800> >(), "blue"}

  
};
Preset no_blade_presets[] = {
  { "TeensySF", "tracks/mars.wav", 
   StyleFirePtr<RED, YELLOW, 0>(),
   StyleFirePtr<RED, YELLOW, 0>(),
   StyleFirePtr<RED, YELLOW, 0>(),
   StyleFirePtr<RED, YELLOW, 0>(),
   StyleFirePtr<RED, YELLOW, 0>(),
   StyleFirePtr<BLUE, WHITE, 0>(),

  "no blade" },

};
BladeConfig blades[] = {
 { 0, SubBlade(0, 108, WS281XBladePtr<218, bladePin, Color8::GRBw, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeReverse(108, 217, NULL),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRBw, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    SubBlade(31,42,WS281XBladePtr<42, blade4Pin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >()),
SubBlade(0, 30, NULL)
  , CONFIGARRAY(presets) },
 { NO_BLADE, SubBlade(0, 108, WS281XBladePtr<218, bladePin, Color8::GRBw, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeReverse(108, 217, NULL),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRBw, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL),
     SubBlade(0,30,WS281XBladePtr<42, blade4Pin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >()),
SubBlade(30, 42, NULL)
  , CONFIGARRAY(no_blade_presets), "nb_save" }
,
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

I have a solution for your problem:

Try changing it to:

SubBlade(0,30,WS281XBladePtr<42, blade4Pin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >()),
SubBlade(30, 41, NULL)

It works! THANK YOU.

Now my only problem is that everything lights up like a rainbow…

One possible reason for that is that the pixels are not in fact RGBW.
If you use RGBW for RGB pixels, or use RGB for RGBW pixels, the result is usually rainbow-like.

1 Like

You were right!!!

Now everything works. Time for fonts!! :slight_smile: