// ProffieOS7.14 Config File //Documentation: https://pod.hubbe.net/ & https://www.fett263.com/index.html & https://github.com/profezzorn //Is there a way to get hyperlinks usable from within Sublime Text ? /* This configuration file was pasted together from: - Using my basic config "olibasic4.h" genarated with https://fredrik.hubbe.net/lightsaber/v6/ & - "oliconfig2_Ryryog25.h", build with ProffieConfig 1.6.9, created by Ryryog25. The tool can be found here: https://github.com/ryryog25/ProffieConfig/wiki/ProffieConfig ProffieConfig is an All-In-One utility for managing your Proffieboard. & - "oliconfig1_fett263.h" generated via Fett263 https://fett263.com/fett263-os7-config-helper.html but my blade styles failed to compile so I will try again at a later stage. */ #ifdef CONFIG_TOP // https://pod.hubbe.net/config/the-config_top-section.html #include "proffieboard_v3_config.h" //Is there a way to get hyperlinks usable from within Sublime Text ? This is probably off-topic on the #define NUM_BLADES 4 #define NUM_BUTTONS 2 #define VOLUME 1000 #define BOOT_VOLUME 300 const unsigned int maxLedsPerStrip = 144; #define CLASH_THRESHOLD_G 2.0 //#define AUDIO_CLASH_SUPPRESSION_LEVEL 10 #define ENABLE_AUDIO #define ENABLE_MOTION #define ENABLE_WS2811 #define SHARED_POWER_PINS #define BLADE_DETECT_PIN blade5Pin //PROFFIECONFIG ENABLE_MASS_STORAGE //From oliconfig2_Ryryog25.h. Should I/May I remove the "//" or is this just a reminder to activate it in Arduino IDE ? //PROFFIECONFIG ENABLE_WEBUSB #define ENABLE_SERIAL //Don't use "Serial + Mass Storage" if not neccessary. (To save memory) //Serial port can be used to talk to a BLE chip. I use BT909 so do not disable (by adding "//") SERIAL, unless absolutely necessary! //#define BLE_PASSWORD "password" #define BLE_NAME "oli_saber" // <-- Will this work with BT909 module ? Will my phone see "oli_saber" ? //#define BLE_SHORTNAME "saber" #define ENABLE_SSD1306 //To activate OLED //#define OLED_FLIP_180 //To flip the OLED displayed content 180 degrees. //#define OLED_MIRRORED //Shows the OLED displayed content in reverse //#define ENABLE_SPIDISPLAY #define PLI_OFF_TIME 10000 //Duration that Power Level Indicator will show on OLED when blade is turned off. Set for 10 seconds. #define MOTION_TIMEOUT 60 * 15 * 1000 //keeps motion chip active for 15 minutes while blade is Off #define IDLE_OFF_TIME 60 * 20 * 1000 //Timeout for accent LEDs (in milliseconds), this example would set it to 20 minutes //Do I need to include any "ORIENTATION" if my orientation is default ? //#define ORIENTATION_ROTATION 0,20,0 //For Curved hilts, or where the board is not parallel with the blade. This will rotate the orientation of the board 20 degrees around the Y axis. //#define ORIENTATION ORIENTATION_FETS_TOWARDS_BLADE //Default is USB connector points away from blade //#define ORIENTATION ORIENTATION_USB_TOWARDS_BLADE // https://pod.hubbe.net/config/the-config_top-section.html#optional-defines //#define ORIENTATION ORIENTATION_USB_CCW_FROM_BLADE //#define ORIENTATION ORIENTATION_USB_CW_FROM_BLADE //#define ORIENTATION ORIENTATION_TOP_TOWARDS_BLADE //#define ORIENTATION ORIENTATION_BOTTOM_TOWARDS_BLADE //#define ORIENTATION_ROTATION X,Y,Z //#define DUAL_POWER_BUTTONS // The AUX will also turn the saber on. If not defined, AUX will go to next preset when off. #define USE_AUREBESH_FONT //To see font name in Aurabesh on OLED #define KEEP_SAVEFILES_WHEN_PROGRAMMING // https://github.com/profezzorn/ProffieOSDocs/blob/main/config/keeping-edits-when-uploading.md #define DISABLE_DIAGNOSTIC_COMMANDS //To save memory #define DISABLE_BASIC_PARSER_STYLES //To save memory #define KILL_OLD_PLAYERS //The result is that the new sound always plays. #define FEMALE_TALKIE_VOICE //only affects built-in error messages //#define DISABLE_TALKIE //To save memory, ProffieOS will use short melodies to indicate an error instead. // https://pod.hubbe.net/troubleshooting/beep_codes.html // https://pod.hubbe.net/troubleshooting/what-is-it-saying.html // https://github.com/profezzorn/ProffieOSDocs/blob/main/troubleshooting/status-led.md #define ENABLE_ALL_EDIT_OPTIONS // Edit Settings define, not Edit Mode. What does that mean ????? // Do I need any of these since I will use SAVE_STATE ???????????? //#define SAVE_COLOR_CHANGE //to save the color change state //#define SAVE_BLADE_DIMMING //#define DYNAMIC_BLADE_DIMMING //controllable from ProffieOS Workbench or some props. //#define DYNAMIC_BLADE_LENGTH //controllable from ProffieOS Workbench or some props. //#define SAVE_CLASH_THRESHOLD //#define DYNAMIC_CLASH_THRESHOLD //controllable from ProffieOS Workbench or some props. //#define SAVE_VOLUME //Start with the volume used last //#define SAVE_PRESET //Start at the last preset when you turn the saber on #define SAVE_STATE //to encompass SAVE_COLOR_CHANGE, SAVE_BLADE_DIMMING, SAVE_VOLUME and SAVE_PRESET #define NO_REPEAT_RANDOM #define POV_INCLUDE_FILE "star_wars_logo_pov_data.h" //Disable to save memory #define FETT263_EDIT_MODE_MENU //I do not understand FETT263_SPECIAL_ABILITIES ??????????? //#define FETT263_SPECIAL_ABILITIES // https://github.com/profezzorn/ProffieOS/blob/master/props/saber_fett263_buttons.h #define FETT263_RANDOMIZE_QUOTE_PLAYER #define NO_REPEAT_RANDOM //What is the difference with FETT263_RANDOMIZE_QUOTE_PLAYER ? #define FETT263_USE_BC_MELT_STAB #define FETT263_CIRCULAR_DIM_MENU // WHAT DO THESE 2 DO ???????????? #define COLOR_CHANGE_DIRECT //From oliconfig2_Ryryog25.h //or vice-versa ? #define EXTRA_COLOR_BUFFER_SPACE 60 //From oliconfig1_fett263.h //or vice-versa ? #define FETT263_BM_CLASH_DETECT 4.0 #define FETT263_MOTION_WAKE_POWER_BUTTON #define FETT263_HOLD_BUTTON_OFF #define FETT263_HOLD_BUTTON_LOCKUP #define FETT263_LOCKUP_DELAY 200 // Thrust #define FETT263_THRUST_ON_PREON //enables Thrust On Ignition #define FETT263_THRUST_ON_NO_BM //Swing //#define FETT263_SWING_ON //enables Swing On Ignition #define FETT263_SWING_ON_PREON //Chose one! "ON" or "ON_PREON" //#define FETT263_SWING_ON_NO_BM // "NO_BM" no battle mode //#define FETT263_SWING_ON_SPEED 250 //Twist #define FETT263_TWIST_ON //enables Twist On Ignition //#define FETT263_TWIST_ON_NO_BM //Stab #define FETT263_STAB_ON #define FETT263_SAY_BATTERY_PERCENT #define FETT263_SAY_COLOR_LIST #define FETT263_SAY_COLOR_LIST_CC #define FETT263_CIRCULAR_VOLUME_MENU #define FETT263_MOTION_WAKE_POWER_BUTTON #define FETT263_HOLD_BUTTON_OFF #define FETT263_SAY_COLOR_LIST //#define FETT263_TWIST_OFF //enables Twist Off Retraction #define FETT263_FORCE_PUSH //enables Force Push gesture/sound during Battle Mode #define FETT263_MULTI_PHASE //enables Multi-Phase preset changing while blade is ON #define FETT263_DUAL_MODE_SOUND #define FETT263_CLASH_STRENGTH_SOUND //enables Clash Strength selection for sounds //#define FETT263_MAX_CLASH 1276800 //optional define to set the hardest clash on saber range 8 ~ 16, defaults to 16 if not defined // Blade ID (if ever needed it) /*#define BLADE_ID_SCAN_MILLIS 1000 //To activate Blade ID constant monitoring #define BLADE_ID_TIMES 1000 // https://github.com/profezzorn/ProffieOSDocs/blob/main/howto/blade-id-constant-monitoring.md #define ENABLE_POWER_FOR_ID PowerPINS // https://github.com/profezzorn/ProffieOSDocs/blob/main/howto/blade-id.md #define BLADE_ID_CLASS */ //#define RFID_SERIAL Serial3 //Add an RFID reader. To configure, you will need an RFID_Commands array in the CONFIG_PRESETS section. #endif //Workbench // https://github.com/profezzorn/ProffieOSDocs/blob/main/tools/workbench.md //Web-Bluetooth // https://profezzorn.github.io/lightsaber-web-bluetooth/app.html (<-- Open in Chrome not Firefox) //Web-USB // https://fredrik.hubbe.net/lightsaber/webusb.html // https://pod.hubbe.net/troubleshooting/webusb.html //To get config from Proffie SD, is there a way to get it out of Proffie board ? // https://github.com/profezzorn/ProffieOSDocs/blob/main/config/get-from-sd-card.md //I would like to be able to use my Proffie board for all 3: Saber, Blaster & Thermal Detonator. I guess I can find the right sound font for TD & have Proffie as a Saber & Blaster ? #ifdef CONFIG_PROP #include "../props/dual_prop.h" // https://github.com/profezzorn/ProffieOSDocs/blob/main/props/using-dual_prop.h.md #include "../props/saber_fett263_buttons.h" // https://github.com/profezzorn/ProffieOS/blob/master/props/saber_fett263_buttons.h #include "../props/blaster.h" // https://github.com/profezzorn/ProffieOS/blob/master/props/blaster.h //#include "../props/detonator.h" // https://github.com/profezzorn/ProffieOS/blob/master/props/detonator.h #endif #ifdef CONFIG_PRESETS Preset presets[] = { { "TeensySF;common", "tracks/venus.wav", StyleNormalPtr(), StylePtr(), StylePtr(), StyleNormalPtr(), "cyan"}, { "SmthGrey;common", "tracks/mercury.wav", StyleFirePtr(), StylePtr(), StylePtr(), StyleFirePtr(), "fire"}, { "SmthFuzz;common", "tracks/uranus.wav", StyleNormalPtr(), StylePtr(), StylePtr(), StyleNormalPtr(), "red"}, { "RgueCmdr;common", "tracks/venus.wav", StyleFirePtr(), StylePtr(), StylePtr(), StyleFirePtr(), "blue fire"}, { "TthCrstl;common", "tracks/mars.wav", StylePtr, WHITE), 300, 800> >(), StylePtr(), StylePtr(), StylePtr, WHITE), 300, 800> >(), "green"}, { "TeensySF;common", "tracks/mercury.wav", StyleNormalPtr(), StylePtr(), StylePtr(), StyleNormalPtr(), "white"}, { "SmthJedi;common", "tracks/uranus.wav", StyleNormalPtr, BLUE, 300, 800>(), StylePtr(), StylePtr(), StyleNormalPtr, BLUE, 300, 800>(), "yellow"}, { "SmthGrey;common", "tracks/venus.wav", StylePtr >(), StylePtr(), StylePtr(), StylePtr >(), "magenta"}, { "SmthFuzz;common", "tracks/mars.wav", StyleNormalPtr, Gradient, 300, 800>(), StylePtr(), StylePtr(), StyleNormalPtr, Gradient, 300, 800>(), "gradient"}, { "RgueCmdr;common", "tracks/mercury.wav", StyleRainbowPtr<300, 800>(), StylePtr(), StylePtr(), StyleRainbowPtr<300, 800>(), "rainbow"}, { "TthCrstl;common", "tracks/uranus.wav", StyleStrobePtr(), StylePtr(), StylePtr(), StyleStrobePtr(), "strobe"}, { "TeensySF;common", "tracks/venus.wav", // &style_pov, // StyleNormalPtr(), // Disable this to save memory StyleNormalPtr(), // StyleNormalPtr(), "pov"}, // { "SmthJedi;common", "tracks/mars.wav", &style_charging, StyleNormalPtr(), StyleNormalPtr(), StyleNormalPtr(), "battery\nlevel"} }; /*In case you are wondering why I have so many "NO_BLADE_PRESETS", it is because I do not have a blade yet, or even a hilt. I only have a chassis (it is the "Imp Sword Crystal Chamber Install Chassis" from https://www.saberbay.com/products/imp-sword - I am not sponsored - with all the available options, I wish it had a rotating plasma gate!), and the Proffie Board is not even soldered to it yet, but hopefully, I can get to that soon. I also have a baselit blade plug. I might attempt to convert it to NPXL if I am not happy with its look as a baselit. Now I understand how "Blade ID" might come in handy. But then again, what is the worst that can happen if the blade plug has fewer pixels than the blade? As I am in a move between two houses, it will be a while before I will order more parts, and even longer before they get to be delivered to me. But in the meantime, I am hoping to get a nice config working. Eventualy, I would like to include about 50ish Sound fonts & several voice packs + some "nicely complicated" blade styles from Fett263 if possible ? Thank you for taking the time for reading & reviewing my config attemps. */ Preset no_blade_presets[] = { { "Crispity;common", "Crispity/tracks/track1.wav", StylePtr(), StyleFirePtr(), StyleFirePtr(), StyleFirePtr(), "no blade" }, { "TeensySF;common", "tracks/venus.wav", StylePtr(), // Marble style by Proffezzorn StylePtr,Int<40000>,Ifon,Int<0>>,Int<1276800>>,ChangeSlowly,Int<3276>>,Int<2048>>>,Black,Mix,Int<2000>>,Rgb<0,0,20>,Rgb<0,255,255>>>>(), // Marble style by Proffezzorn StylePtr,Int<40000>,Ifon,Int<0>>,Int<1276800>>,ChangeSlowly,Int<3276>>,Int<2048>>>,Black,Mix,Int<2000>>,Rgb<0,0,20>,Rgb<0,255,255>>>>(), StyleNormalPtr(), "no blade\n cyan"}, { "SmthJedi;common", "tracks/mars.wav", StylePtr(), StylePtr >(), StylePtr >(), StylePtr >(), "no blade\n blue"}, // " " added before blue to keep the 2 lines centered with each other on OLED { "SmthGrey;common", "tracks/mercury.wav", StylePtr(), StyleFirePtr(), StyleFirePtr(), StyleFirePtr(), "no blade\n fire"}, { "SmthFuzz;common", "tracks/uranus.wav", StylePtr(), StyleNormalPtr(), StyleNormalPtr(), StyleNormalPtr(), "no blade\n red"}, { "RgueCmdr;common", "tracks/venus.wav", StylePtr(), StyleFirePtr(), StyleFirePtr(), StyleFirePtr(), " no blade\nblue fire"}, { "TthCrstl;common", "tracks/mars.wav", StylePtr(), StylePtr, WHITE), 300, 800> >(), StylePtr, WHITE), 300, 800> >(), StylePtr, WHITE), 300, 800> >(), "no blade\n green"}, { "TeensySF;common", "tracks/mercury.wav", StylePtr(), StyleNormalPtr(), StyleNormalPtr(), StyleNormalPtr(), "no blade\n white"}, { "SmthJedi;common", "tracks/uranus.wav", StylePtr(), StyleNormalPtr, BLUE, 300, 800>(), StyleNormalPtr, BLUE, 300, 800>(), StyleNormalPtr, BLUE, 300, 800>(), "no blade\n yellow"}, { "SmthGrey;common", "tracks/venus.wav", StylePtr(), StylePtr >(), StylePtr >(), StylePtr >(), "no blade\n magenta"}, { "SmthFuzz;common", "tracks/mars.wav", StylePtr(), StyleNormalPtr, Gradient, 300, 800>(), StyleNormalPtr, Gradient, 300, 800>(), StyleNormalPtr, Gradient, 300, 800>(), "no blade\ngradient"}, { "RgueCmdr;common", "tracks/mercury.wav", StylePtr(), StyleRainbowPtr<300, 800>(), StyleRainbowPtr<300, 800>(), StyleRainbowPtr<300, 800>(), "no blade\n rainbow"}, { "TthCrstl;common", "tracks/uranus.wav", StylePtr(), StyleStrobePtr(), StyleStrobePtr(), StyleStrobePtr(), "no blade\n strobe"}, { "SmthJedi;common", "tracks/mars.wav", StylePtr(), &style_charging, StyleNormalPtr(), StyleNormalPtr(), "batt level\n no blade"} }; BladeConfig blades[] = { { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS >(), SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS >()), SubBladeWithStride(1, 15, 2, NULL), WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS >(), CONFIGARRAY(presets) }, { NO_BLADE, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS >(), SubBladeWithStride(0, 15, 2, WS281XBladePtr<16, blade2Pin, Color8::GRB, PowerPINS >()), SubBladeWithStride(1, 15, 2, NULL), WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS >(), CONFIGARRAY(no_blade_presets), "nb_save" }, }; /*RFID_Command RFID_Commands[] = { //To investigate if this could be used as "using the force" like the { 0x0000000C04ULL, "change_preset", "0" }, //magnetic activation ring for CFX board & what "hardware" would I need (or whish for Proffie V4.x) ? { 0x09003A8CDCULL, "change_preset", "1" }, }; */ #endif #ifdef CONFIG_BUTTONS Button PowerButton(BUTTON_POWER, powerButtonPin, "pow"); Button AuxButton(BUTTON_AUX, auxPin, "aux"); //BUTTON_AUX2 // https://github.com/profezzorn/ProffieOSDocs/blob/main/config/the-config_buttons-section.md //BUTTON_UP // //BUTTON_DOWN // //BUTTON_LEFT //UP, DOWN, LEFT, RIGHT & SELECT could be defined if wanting to use a "Potentiometer"/"Joystick" //BUTTON_RIGHT // //BUTTON_SELECT // #endif //#ifndef CONFIG_STYLES //using BatteryLevelStyle = InOutHelperX, BatteryLevel>; //more stuff can come here //#endif /*#ifdef CONFIG_BOTTOM DisplayHelper<128, uint32_t, //OLED additional features: "Bullet Counts" - Code needed to activate the display. BaseLayerOp, // https://github.com/profezzorn/ProffieOSDocs/blob/main/display/bullet-counts.md ClearRectangleOp<10, 80, 8, 24>, // WriteBulletCountOp<10, 20, 5> // https://github.com/profezzorn/ProffieOSDocs/blob/main/display/images-and-animations.md > display_controller; SSD1306Template<128, uint32_t> display(&display_controller); SPIDisplay_DFRobot096<3> display; //This for a color display but I would need to install "package_proffieboard_experimental_index.json" in Arduino IDE (Will it work in Arduino IDE 1.8.19 or do I need to upgrade to Arduino IDE V2.x?) StandarColorDisplayController<160, 80> display_controller(&display); #endif*/ // Generated with Fett263 Config Helper v3.10d //