Arduino Error

Good afternoon,

I am new to Proffie. I am trying to program a v3.9 and during the Arduino verification process it returned with this error message -

"Compilation error" '$BLADES$' was not declared in this scope" I am setting up a cross-guard with lit PCB’s.

In using Fett263 config program the end coding is as follows:

BladeConfig blades[] = {
{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),

SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),

SubBladeWithStride(1, 15, 2, NULL),

WS281XBladePtr<144, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin1> >()),
SubBladeWithStride(1, 15, 2, NULL),
WS281XBladePtr<3, blade6Pin, Color8::GRB, PowerPINS<bladePowerPin4> >()

, CONFIGARRAY(presets) },

{ NO_BLADE, $BLADES$ CONFIGARRAY(no_blade_presets), "nb_save" }

Here is my question: Should I remove $BLADES$, if not how can I correct? The Proffie manual does not show $BLADES$ in the section for “no blade” configuration.

There are “no_blade” presets within the body of the file.

Thank you for your help.

There are two sections, at the top and bottom config what you showed was the bottom.

Please paste the config and encircle it ` ( no spaces in between the characters)

Echoing Afrojedi’s comment–you need to post the full config.

Your first blade array has 7 elements–your num blades must match.
Instead of BLADES in the NO_BLADE preset, you need the same number of dummy blades as your other presets.

This might also help;
ProffieOS Documentation: Blade ID (hubbe.net)

1 Like

I think where it says $BLADES$ something (a script, you?) is meant to insert the actual blade definitions, like you have in the previous blades entry.

// ProffieOS7 Config File
#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 7
#define NUM_BUTTONS 2
const unsigned int maxLedsPerStrip = 144;
#define EXTRA_COLOR_BUFFER_SPACE 60
#define VOLUME 1500
#define BOOT_VOLUME 100
#define CLASH_THRESHOLD_G 3
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define MOTION_TIMEOUT 60 * 5 * 1000
#define IDLE_OFF_TIME 60 * 5 * 1000
#define DISABLE_BASIC_PARSER_STYLES
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ENABLE_ALL_EDIT_OPTIONS
#define SAVE_PRESET
#define NO_REPEAT_RANDOM
#define COLOR_CHANGE_DIRECT
#define BLADE_DETECT_PIN blade2Pin
#define ENABLE_SSD1306
#define FETT263_SAY_BATTERY_PERCENT
#define FETT263_MOTION_WAKE_POWER_BUTTON
#define FETT263_HOLD_BUTTON_LOCKUP
#define FETT263_LOCKUP_DELAY 200
#define FETT263_BM_CLASH_DETECT 6
#define FETT263_THRUST_ON
#define FETT263_THRUST_ON_NO_BM
#define FETT263_TWIST_OFF
#endif

#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif
BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    WS281XBladePtr<144, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin1> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    WS281XBladePtr<3, blade6Pin, Color8::GRB, PowerPINS<bladePowerPin4> >()
  , CONFIGARRAY(presets) },
 { NO_BLADE, $BLADES$ CONFIGARRAY(no_blade_presets), "nb_save" }
,
};

#endif

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

 /* Generated with Fett263 Config Helper v3.07 */

Seems like a bug in the @Fett263 config generator.

Posted below (minus all the blade presets) Thank you for the help

do you think I should delete BLADES script ? Any thoughts on a fix?

$BLADES$ needs to be replaced with actual blade definitions.
Just removing it will not make it any better.

The config tool does not and cannot generate the BladeConfig {} section, this must be pasted by the user into the tool from the user’s original config. The tool uses the BladeConfig as-is, it’s not able to check for errors as there’s simply too many variables involved.

Uh, wonder where $BLADES$ came from originally then?

Not sure, only the installer could answer.

The config file was generated on the Proffieboard v3 ("Fredrickhubbe.net) “Configurator Generator” page. Below is directly from that page: (minus the blades to save room for this post)

#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 7
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#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 blade5Pin
#define ENABLE_SSD1306
#endif

Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",

   { "SmthJedi", "tracks/mars.wav",
   
   { "SmthGrey", "tracks/mercury.wav",

   { "SmthFuzz", "tracks/uranus.wav",

   { "RgueCmdr", "tracks/venus.wav",

   { "TeensySF", "tracks/mercury.wav",

   { "SmthJedi", "tracks/uranus.wav",
  
   { "SmthGrey", "tracks/venus.wav",

   { "SmthFuzz", "tracks/mars.wav",

   { "RgueCmdr", "tracks/mercury.wav",

   { "TthCrstl", "tracks/uranus.wav",
  
   { "TeensySF", "tracks/venus.wav",
   },
   { "SmthJedi", "tracks/mars.wav","}
};
Presets no_blade_presets[] = {
  { "TeensySF", "tracks/mars.wav", 

  "no blade" },

};
BladeConfig blades[] = {
 { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    WS281XBladePtr<144, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(),
    SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin1> >()),
    SubBladeWithStride(1, 15, 2, NULL),
    WS281XBladePtr<1, blade6Pin, Color8::GRB, PowerPINS<bladePowerPin4> >()
  , CONFIGARRAY(presets) },
 { NO_BLADE, $BLADES$ CONFIGARRAY(no_blade_presets), "nb_save" }
,
};
#endif

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

Thank you for the response.

I am new to proffie and doing a self-install. I followed the directions within the ProffieBoard site, cutting and pasted the “ending config” into your blade generator which was easy to follow (thank you). The error doesn’t seem to be on your config blade tool, but based from the Proffie site. I may need to “re-write” the “no_blade” to read (from the ProffieOS documentation)

      { NO_BLADE,
        WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
        CONFIGARRAY(no_blade), "nbsave" }
    };

Thank you “profezzorn” for your insight. As the reference to BLADES is not good.

Again thank you helping someone new to proffie programming/installing.

1 Like

Ah, so I guess this is a bug in my configuration generator…
Should be fixed now.

I hate to be a pain but there is no change.

Code used from config generator:

#ifdef CONFIG_TOP
#include “proffieboard_v3_config.h”
#define NUM_BLADES 7
#define NUM_BUTTONS 2
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#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 blade5Pin
#define ENABLE_SSD1306
#endif

BladeConfig blades = {
{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
SubBladeWithStride(1, 15, 2, NULL),
WS281XBladePtr<144, blade3Pin, Color8::GRB, PowerPINS >(),
SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade4Pin, Color8::GRB, PowerPINS >()),
SubBladeWithStride(1, 15, 2, NULL),
WS281XBladePtr<3, blade6Pin, Color8::GRB, PowerPINS >()
, CONFIGARRAY(presets) },
{ NO_BLADE, BLADES CONFIGARRAY(no_blade_presets), “nb_save” }
,
};
#endif

You need a Preset array called no_blade for that. I’ll assume you only have a preset array for presets, or, as it seems, you have a Presets array called no_blade_presets, not no_blade

update: So I think I have moved past one error by writing (no_blade_preset) for the config:
BladeConfig blades = {
{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()),
SubBladeWithStride(1, 15, 2, NULL),
WS281XBladePtr<144, blade3Pin, Color8::GRB, PowerPINS >(),
SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade4Pin, Color8::GRB, PowerPINS >()),
SubBladeWithStride(1, 15, 2, NULL),
WS281XBladePtr<3, blade6Pin, Color8::GRB, PowerPINS >()
, CONFIGARRAY(presets) },
{ NO_BLADE,
WS281XBladePtr<10, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
CONFIGARRAY(no_blade_preset), “nbsave” }
,
};

#endif

BUT I now have a new error from Arduino: Help is greatly appreciated!!

In file included from C:\Users\Marc\Desktop\ProffieOS\ProffieOS\ProffieOS.ino:591:
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\config\myconfig.h:474:21: error: cannot convert ‘Preset*’ to ‘BladeBase*’ in initialization
474 | CONFIGARRAY(no_blade_presets), “nbsave” }
| ^~~~~~~~~~~~~~~~
| |
| Preset*
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\common\preset.h:6:24: note: in definition of macro ‘CONFIGARRAY’
6 | #define CONFIGARRAY(X) X, NELEM(X)
| ^
In file included from C:\Users\Marc\Desktop\ProffieOS\ProffieOS\ProffieOS.ino:240:
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\common\common.h:18:28: error: invalid conversion from ‘unsigned int’ to ‘BladeBase*’ [-fpermissive]
18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))
| ^~~~~~
| |
| unsigned int
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\common\preset.h:6:27: note: in expansion of macro ‘NELEM’
6 | #define CONFIGARRAY(X) X, NELEM(X)
| ^~~~~
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\config\myconfig.h:474:9: note: in expansion of macro ‘CONFIGARRAY’
474 | CONFIGARRAY(no_blade_presets), “nbsave” }
| ^~~~~~~~~~~
In file included from C:\Users\Marc\Desktop\ProffieOS\ProffieOS\ProffieOS.ino:621:
C:\Users\Marc\Desktop\ProffieOS\ProffieOS\config\myconfig.h:474:40: error: cannot convert ‘const char*’ to ‘BladeBase*’ in initialization
474 | CONFIGARRAY(no_blade_presets), “nbsave” }
| ^~~~~~~~
| |
| const char*

exit status 1

Compilation error: cannot convert ‘Preset*’ to ‘BladeBase*’ in initialization

Your NO_BLADE blade array doesn’t have enough blades. You #defined 7 blades, so there needs to be 7 blades in the NO_BLADE array too.

1 Like

7 blades were created and included.

1 Like