// This is a simplified config file template set up for Blade ID.
#ifdef CONFIG_TOP
#define SHARED_POWER_PINS
// #define BLADE_DETECT_PIN blade4Pin
#define ENABLE_POWER_FOR_ID PowerPINS<bladePowerPin2, bladePowerPin3>
// #define BLADE_ID_CLASS ExternalPullupBladeID<bladeIdentifyPin, 33000> // value of resistor used
// #define BLADE_ID_CLASS BridgedPullupBladeID<bladeIdentifyPin, 9> // TX pad for example
/* This will make it use the speed-of-charging-a-capacitor method of blade ID which sometimes works without resistors.
Blade ID can detect if a blade is connected or not, but it won't actually reach the NO_BLADE value,
so I would recommend using something like 200000 instead of NO_BLADE. */
#define BLADE_ID_CLASS SnapshotBladeID<bladeIdentifyPin>
/* Millis is Blade ID scan interval. If the blade ID comes out the same as before, it will do nothing.
If it comes out different, it will do FindBladeAgain(), which will basically initialize the saber from
scratch and load the right settings for the new id().
It will only work with neopixel blades, and requires SHARED_POWER_PINS to work. */
#define BLADE_ID_SCAN_MILLIS 1000
// How many Blade ID scans to average
#define BLADE_ID_TIMES 15
// other defines go here
#endif
#ifdef CONFIG_PROP
#include "../props/PROP_FILE_OF_CHOICE_GOES_HERE.h"
#endif
#ifdef CONFIG_PRESETS
Preset blade_1 [] = {
is it possible to have the bladein and bladeout files in the root of the sd card so all the fonts use the same sound?
ProffieOS will not attempt any kind of blade ID if you only have one entry in your blades[] array, and as long as you have only one entry, it doesn’t matter what value you put there.
so If I want to have the blade out make a sound all I need to do is place the bladein and bladeout.wav in the common directory, is that all? or do I need to put a line in the blade section?
That stuff is if you want to have blade ID run every couple of seconds.
Without that, blade ID only runs when ProffieOS boots.
You probably want that, but it may also cause problems, YMMV.
yes, but you’re missing { NO_BLADE, at the beginning on line 5. (And the }; at the end, but that’s probably just a copy-paste thing.)
In file included from /home/deck/.config/jmt-studio/ProffieOS/ProffieOS.ino:613:
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:400:17: error: 'blade_1' was not declared in this scope; did you mean 'blades'?
400 | CONFIGARRAY(blade_1), "blade_1_Save" },
| ^~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/preset.h:7:24: note: in definition of macro 'CONFIGARRAY'
7 | #define CONFIGARRAY(X) X, NELEM(X)
| ^
In file included from /home/deck/.config/jmt-studio/ProffieOS/common/capabilities.h:4,
from /home/deck/.config/jmt-studio/ProffieOS/ProffieOS.ino:51:
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:400:17: error: 'blade_1' was not declared in this scope; did you mean 'blades'?
400 | CONFIGARRAY(blade_1), "blade_1_Save" },
| ^~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/common.h:18:26: note: in definition of macro 'NELEM'
18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))
| ^
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:400:5: note: in expansion of macro 'CONFIGARRAY'
400 | CONFIGARRAY(blade_1), "blade_1_Save" },
| ^~~~~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:400:17: error: 'blade_1' was not declared in this scope; did you mean 'blades'?
400 | CONFIGARRAY(blade_1), "blade_1_Save" },
| ^~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/common.h:18:37: note: in definition of macro 'NELEM'
18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))
| ^
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:400:5: note: in expansion of macro 'CONFIGARRAY'
400 | CONFIGARRAY(blade_1), "blade_1_Save" },
| ^~~~~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:402:17: error: 'no_blade' was not declared in this scope
402 | CONFIGARRAY(no_blade), "no_blade_Save" }
| ^~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/preset.h:7:24: note: in definition of macro 'CONFIGARRAY'
7 | #define CONFIGARRAY(X) X, NELEM(X)
| ^
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:402:17: error: 'no_blade' was not declared in this scope
402 | CONFIGARRAY(no_blade), "no_blade_Save" }
| ^~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/common.h:18:26: note: in definition of macro 'NELEM'
18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))
| ^
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:402:5: note: in expansion of macro 'CONFIGARRAY'
402 | CONFIGARRAY(no_blade), "no_blade_Save" }
| ^~~~~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:402:17: error: 'no_blade' was not declared in this scope
402 | CONFIGARRAY(no_blade), "no_blade_Save" }
| ^~~~~~~~
/home/deck/.config/jmt-studio/ProffieOS/common/common.h:18:37: note: in definition of macro 'NELEM'
18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))
| ^
/home/deck/.config/jmt-studio/ProffieOS/config/my_config.h:402:5: note: in expansion of macro 'CONFIGARRAY'
402 | CONFIGARRAY(no_blade), "no_blade_Save" }
| ^~~~~~~~~~~
Using library Wire at version 1.0 in folder: /home/deck/.arduino15/packages/proffieboard/hardware/stm32l4/4.6/libraries/Wire
e[92mUsed librarye[0m e[92mVersione[0m e[90mPathe[0m
e[93mWiree[0m 1.0 e[90m/home/deck/.arduino15/packages/proffieboard/hardware/stm32l4/4.6/libraries/Wiree[0m
e[92mUsed platforme[0m e[92mVersione[0m e[90mPathe[0m
e[93mproffieboard:stm32l4e[0m 4.6 e[90m/home/deck/.arduino15/packages/proffieboard/hardware/stm32l4/4.6e[0m
Error during build: exit status 1
--- Compile failed ---
Doesn’t look like it, just presets.
If you want the same set of presets when the blade is in and out, just replace “blade_1” and “no_blade” with “presets”.
If you want them to be different, make two preset arrays, one called “blade_1” and one called “no_blade”.
There should still be the one’s I posted up in The Free Font Library. Check under the blade detect stuff if you can’t find “Glitch” since when I started the blade detect sound option project some of those got moved in there. Also check your DM’s in the book of faces.