Button issue after changing v2.2 to v3.9


I’ve recently changed an existing saber’s soundboard (Replaced a v2.2 with a v3.9).

After doing so, I flashed the latest ProffieOS (v7.12) using the default config generated by the configurator tool based on a neopixel, one-button setup:

#include "proffieboard_v3_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 1
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#define ENABLE_WS2811
#define ENABLE_SD

Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",
    StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"},
   { "SmthJedi", "tracks/mars.wav",
    StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(), "blue"},
   { "SmthGrey", "tracks/mercury.wav",
    StyleFirePtr<RED, YELLOW>(), "fire"},
   { "SmthFuzz", "tracks/uranus.wav",
    StyleNormalPtr<RED, WHITE, 300, 800>(), "red"},
   { "RgueCmdr", "tracks/venus.wav",
    StyleFirePtr<BLUE, CYAN>(), "blue fire"},
   { "TthCrstl", "tracks/mars.wav",
    StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(), "green"},
   { "TeensySF", "tracks/mercury.wav",
    StyleNormalPtr<WHITE, RED, 300, 800, RED>(), "white"},
   { "SmthJedi", "tracks/uranus.wav",
    StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(), "yellow"},
   { "SmthGrey", "tracks/venus.wav",
    StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(), "magenta"},
   { "SmthFuzz", "tracks/mars.wav",
    StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(), "gradient"},
   { "RgueCmdr", "tracks/mercury.wav",
    StyleRainbowPtr<300, 800>(), "rainbow"},
   { "TthCrstl", "tracks/uranus.wav",
    StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(), "strobe"},
   { "TeensySF", "tracks/venus.wav",
    &style_pov, "POV"},
   { "SmthJedi", "tracks/mars.wav",
    &style_charging, "Battery\nLevel"}
BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },

Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");

After doing so, I have encountered the following issue:

With the stock config, the saber will not register any form of long or double press. It will just activate the blade the moment the button is pressed, and then turn it off the moment it is pressed a second time (It’s not requiring it to be held to be turned off).

For this reason, I cannot do things like change fonts, play tracks etc, because it is not registering long or double presses.

I tried setting the prop file to saber_sa22c_buttons.h (This is what I was using with the old v2.2 soundboard) and this time it will turn on with the button press, but will not turn off (as it will not register any long presses).

I know the issue can’t be the physical button assembly, as it was working fine with my v2.2.

Also, using the serial terminal, I can move thru the fonts without any issues, and turn the blade on/off all using serial commands.

Does anyone know what could be causing long/double presses to not be registered? Is there something specific to v3.9 that I could be missing?

Below is the wiring I’m following:

Might just be a bad button?
What does the serial monitor say?

1 Like

It was.

I was too quick to decide that the button assembly wasn’t the problem.

I tested with a multimeter and while it seemed to be fine, one of the connections bust have been dodgy, because once I reflowed the pcb that the button is part of, the problem was resolved.

Thank you again @profezzorn

1 Like