Os6 beta with saberblaster prop

i am doing the phoniex prop spec 6 install.
could anyone can let me know how to code my config file to activate the blaster mode with
a latching button?
i want to use the latching button as a mode switch, switch between the saber mode and the blaster mode. but i have no idea how to do that, could anyone can let me know that?
really thank you.

Do you know how to set up “blade detect”?
Because it’s exactly the same, except that the blade detect wire will go to the switch instead of to the blade detect pin on the pogo pin pcb.

how to set up the blade detect, i did not set up it before

Here’s a couple of links for you.

This thread, while a bit lengthy since it was real time development, is worth a read through until some additional documentation is written.

It resolves with the working solution of a dual_prop.h file used to switch between a saber and blaster button controls based on the blade detect toggle.

so if i need to use blade detect function, i need to add a 470ohm resister to the blaster led pin right?

Nope, blade detect simply senses when the pin is pulled high or low.
No resistor. BladeID would be a different story, as that uses a resistor bridged between the blade’s data and neg.

Arduino:1.8.9 (Windows 10), 开发板:“Proffieboard V2, Serial, SDCARD (SPI), 80 MHz, Smallest Code”

In file included from C:\Users\duanh\Downloads\ProffieOS-v6.0\ProffieOS\ProffieOS.ino:208:0:

sketch\common/common.h:9:24: error: missing binary operator before token “(”

#if __has_cpp_attribute(no_unique_address)

                    ^

In file included from sketch\config/1.h:20:0,

             from C:\Users\duanh\Downloads\ProffieOS-v6.0\ProffieOS\ProffieOS.ino:557:

sketch\config/…/props/dual_prop.h:34:2: error: #error dual_prop.h must be included first

#error dual_prop.h must be included first

^

exit status 1

i am trying copy the config file from the links you give me. but it is some errors with that.

Your prop inclusion in your config should be something like this:

#ifdef CONFIG_PROP
#include "../props/saber_sa22C_buttons.h"
#undef PROP_TYPE
#include "../props/blaster.h"
#include "../props/dual_prop.h"
#undef PROP_TYPE
#define PROP_TYPE SaberBlasterProp<SaberSA22CButtons, Blaster>
#endif

I’m not sure this has been tested since the inception of PONUA, so something might need a tweak. Although it might not be an issue if you first try including the props as above.

#ifdef CONFIG_TOP
#include “proffieboard_v2_config.h”
#define NUM_BLADES 4
#define NUM_BUTTONS 2
#define VOLUME 100
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define BLADE_DETECT_PIN 17

#endif
#ifdef CONFIG_PROP
#include “…/props/saber_sa22C_buttons.h”
#undef PROP_TYPE
#include “…/props/blaster.h”
#include “…/props/dual_prop.h”
#undef PROP_TYPE
#define PROP_TYPE SaberBlasterProp<SaberSA22CButtons, Blaster>
#endif

#ifdef CONFIG_PRESETS

Preset no_blade[] = {

{ “blaster”, “tracks/track1.wav”,
StylePtr(),
StylePtr(),
StylePtr(),
StylePtr(),},
};

Preset blade[] = {

{ “ezra”, “tracks/track2.wav”,
StylePtr(),
StylePtr(),
StylePtr(),
StylePtr(),},

};
BladeConfig blades[] = {

{ 0,
SubBlade(0, 4, WS281XBladePtr<101, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ),
SubBlade(5, 100, NULL),

SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),

SimpleBladePtr<CreeXPE2RedTemplate<1000>, CreeXPE2GreenTemplate<0>, CreeXPE2BlueTemplate<240>, NoLED, bladePowerPin4, bladePowerPin5, bladePowerPin6, -1>(),

CONFIGARRAY(blade) },

{ NO_BLADE,
SubBlade(0, 4, WS281XBladePtr<101, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ),
SubBlade(5, 100, NULL),

SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(),

SimpleBladePtr<CreeXPE2RedTemplate<1000>, CreeXPE2GreenTemplate<0>, CreeXPE2BlueTemplate<240>, NoLED, bladePowerPin4, bladePowerPin5, bladePowerPin6, -1>(),

CONFIGARRAY(no_blade) },

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

#endif

In file included from C:\Users\duanh\Desktop\ProffieOS-v6.0\ProffieOS\ProffieOS.ino:208:0:

sketch\common/common.h:9:24: error: missing binary operator before token “(”

#if __has_cpp_attribute(no_unique_address)

                    ^

In file included from sketch\config/1.h:20:0,

             from C:\Users\duanh\Desktop\ProffieOS-v6.0\ProffieOS\ProffieOS.ino:557:

sketch\config/…/props/dual_prop.h:34:2: error: #error dual_prop.h must be included first

#error dual_prop.h must be included first

^

this is my config file and still these errors,
and i am downing the latest version of proffieos 6 from this website.
the arduino shows there is something wrong with the common.h
In file included from C:\Users\duanh\Desktop\ProffieOS-v6.0\ProffieOS\ProffieOS.ino:208:0:

sketch\common/common.h:9:24: error: missing binary operator before token “(”

#if __has_cpp_attribute(no_unique_address)

What version of the arduino-proffieboard plugin do you have?

oh iam using 1.0version, iam downloading 2.2.0 now sry

The dual_prop.h file really should go first, I think it should look something like:

#ifdef CONFIG_PROP
#include "../props/dual_prop.h"
#include "../props/saber_sa22C_buttons.h"
#undef PROP_TYPE
#include "../props/blaster.h"
#undef PROP_TYPE
#define PROP_TYPE SaberBlasterProp<SaberSA22CButtons, Blaster>
#endif

You should use a different text editor.
You have “fancy” unicode quotation marks and they need to be plain text.
Also, the parent directory 2 dots have been kindly converted to 3 ellipses.
Lastly, once these are corrected, @profezzorn there might be something out of sequence, as it generates the error:

dual_prop.h:33:2: error: #error dual_prop.h must be included first

that’s coming from here:

#ifdef CONFIG_TOP
#include “proffieboard_v2_config.h”
#define NUM_BLADES 2
#define NUM_BUTTONS 2
#define VOLUME 100
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define BLADE_DETECT_PIN 16

#endif
#ifdef CONFIG_PROP
#include “…/props/dual_prop.h”
#include “…/props/saber_sa22C_buttons.h”
#undef PROP_TYPE
#include “…/props/blaster.h”
#undef PROP_TYPE
#define PROP_TYPE SaberBlasterProp<SaberSA22CButtons, Blaster>
#endif

#ifdef CONFIG_PRESETS

Preset no_blade[] = {

{ “Dooku”, “tracks/Dooku.wav”,
StylePtr(),
StylePtr(),},
};

Preset blade[] = {

{ “Ben”, “tracks/Ben.wav”,
StylePtr(),
StylePtr(),
},

};
BladeConfig blades[] = {

{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<144, blade4Pin, Color8::GRB, PowerPINS >(),

CONFIGARRAY(blade) },

{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<144, blade4Pin, Color8::GRB, PowerPINS >(),

CONFIGARRAY(no_blade) },

};
#endif

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

this is the code i use and still some problems i will show you in a vedio

this is the link

  1. when turn the swtich into blade mode the power button and aux button work well, but turn into the no blade mode the power button and aux button doesnt work.
  2. when turn into the blaster mode the led doesnt work, i am sure i made the right connection, but i do not why it doesnt work in the no blade mode

Post your config again, but first type 3 backticks and return, then paste, then return and 3 backticks again. This should remove any false formatting that might be happening, and/or will prove your file is not right

look at this for example

Click the 3 dots at the bottom of this post, then click the Raw icon to view it as typed. (icon is like a piece of paper)