Single Blaster Neopixel

I’m working on my DL-44 build and have the sounds and scope display working but I can’t get the Neopixel lighted. I want to use a single Neopixel and have it light every time the trigger is pulled. I’m using this config:

#ifdef CONFIG_TOP
#include “proffieboard_v2_config.h”
#define NUM_BLADES 1
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_BLASTER_AUTO
//#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
//#define ENABLE_SSD1306
#define INCLUDE_SSD1306 to CONFIG_TOP
#endif

#ifdef CONFIG_PROP
#include “…/props/blaster.h”
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
{ “SmthJedi”, “tracks/venus.wav”,
StyleNormalPtr<CYAN, WHITE, 300, 800>(), “smthjedi”}
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<1, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button FireButton(BUTTON_FIRE, powerButtonPin, “fire”);
Button ModeButton(BUTTON_MODE_SELECT, auxPin, “modeselect”);
#endif
#ifdef CONFIG_BOTTOM
SSD1306Template<128, uint64_t> display(0x3C);
#endif

The Neopixel has the 5v on the positive battery lead, data is connected to Neopixel Data 1 and the ground is on LED 2/3 like a setup from fredrik.hubbe.net

When setup like this the Neopixel does not light for any button press or power on.

Try something like this for your blade style instead:

StylePtr<BlastFadeout<Black,AudioFlicker<Black,Red>,375>>()

1 Like

Tried that didn’t work. :cry:

Hmm, I wonder if the problem is that you’re using a lightsaber font.
If I remember correctly, fonts with “hum” will activate an on/off mode in the blaster prop, so the blaster has to be turned “on” in order for things to work. You can try that in the serial monitor.
I see you say that you tried power on already, was that from the serial monitor?
If so, the next step would be to start checking if the neopixel is getting power and data or not.

Good idea. That’s something I’m still struggling a bit with on the blaster. It seems to turn on with a triple press of the mode button. However, I haven’t tried turning it on in serial mode. I actually pulled in the sounds from BlasterCore. I deleted the hum and swing sounds.

I’m a bit unclear on if that fixed anything or if you need help with maybe how to measure if power and data is reaching your pixel.

Btw, I think I’m going to move this thread to “props”.

1 Like

It is working! I changed out the blade style and its working:

#ifdef CONFIG_TOP
#include “proffieboard_v2_config.h”
#define NUM_BLADES 1
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_BLASTER_AUTO
#define ENABLE_WS2811
#define ENABLE_SD

#define INCLUDE_SSD1306 to CONFIG_TOP
#endif

#ifdef CONFIG_PROP
#include “…/props/blaster.h”
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
{ “SmthJedi”, “tracks/venus.wav”,
StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
“smthjedi”}
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<1, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button FireButton(BUTTON_FIRE, powerButtonPin, “fire”);
Button ModeButton(BUTTON_MODE_SELECT, auxPin, “modeselect”);
#endif
#ifdef CONFIG_BOTTOM
SSD1306Template<128, uint64_t> display(0x3C);
#endif

Just need to do some changes on the sounds. I’m going to add some Optimus Prime blaster sounds as a second profile cause I’m goofy like that.