Getting Started with Proffieboard
Proffieboard is an Open Source Lightsaber Control board created by Fredrik Hubinette (profezzorn). I've put together some helpful resources for those new to Proffieboard to try to help you get started. If you're new to Open Source, Arduino or Custom Lightsabers in general I highly recommend reading and taking some time to learn.
First things first, there is a lot of information, a lot of features and a lot of resources but they are all to help you get the most out of Proffieboard. Everyone, myself included, starts out thinking this is over their head or too challenging or too complicated for them. Anything new requires learning, if you haven't used Proffieboard there is some learning involved, whether it's just learning the buttons and controls or learning to wire the board or learning to update the software you'll need to learn something. In order to help this learning I have put together this page with some basic instruction and links to help you get started.
Some typical jargon to be familiar with:
- Proffieboard - the physical control board pictured above, this lightsaber control board controls the lights and sounds of the lightsaber.
- ProffieOS or ProffieOS.ino - the operating system (OS) for the Proffieboard (software)
- Open Source - refers to "open source" software, like ProffieOS, which is licensed for use and can be edited or modified by any user. In terms of ProffieOS, this allows many people to develop and contribute new features and functionality to the OS and share with other users.
- SD Card - a MicroSD card for your Proffieboard, this card will contain your font (sound files) for your lightsaber.
- Neopixel, ProffiePixel, Pixel Blade, Pixel Strip - "Neopixel" is a trademarked name of Adafruit for individually adressable LEDs that are used in the lightsaber blades to create the lighting and visual effects. Pixel strips run the length of the blade and allow for advanced lighting effects on the saber's blade. 144 pixels/m strips are combined back-to-back to provide even lighting the full length of the blade and since the pixels are individually adressable many unique effects are possible.
- SmoothSwing - a sound algorithm introduced on the first version of ProffieOS that creates realistic sounds as the blade moves, the sound of the blade like in the films is controlled by the movement of the saber itself.
- Arduino - the software on your PC or Mac that connects to the Proffieboard to upload the ProffieOS software. With Proffieboard you create (compile) custom software and "flash" it to the CPU on the Proffieboard, this is what makes the board do things.
- Zadig - a software for PC (not needed on Mac) that installs the proper drivers for your computer to talk to your Proffieboard. Zadig ONLY needs to be used if your computer doesn't know what Proffieboard is AND it only needs to be used ONE TIME, once the drivers are on your computer ALL Proffieboards will be recognized by your computer. If for some reason you have run Zadig multiple times or are having driver issues, this video will help you sort out and fix them: https://www.youtube.com/watch?v=XgT8dq4rhPk
- Config - this refers to your personal config.h file, it's a text file on your computer that includes all of the instructions (or recipe) to customize ProffieOS to your specific lightsaber. Every lightsaber will have a unique config and the config tells Arduino how to create (compile) the software for your lightsaber. Whenever you want to make changes to your lightsaber you are going to update your config. Most installers will put a backup copy on your SD card or if you are building your own saber you want to create and keep a backup of your config. The "recipe" for your saber isn't part of the final OS, it's the instructions to build your custom OS.
- Preset - a preset in your config refers to a specific profile, Proffieboard can run many presets on your saber. The Preset combines a font (sound files) with a track (music file) and a style (visual lighting effects) to create the lightsaber experience.
- Font - a font is a collection of sound files used to create the sounds of your lightsaber. Fonts are typically purchased from font makers. For Proffieboard either Open Source or CFX fonts can be used.
- Track - a track is a music or quote sound file that you can play on your saber for ambiance
- Style - a style is the code that tells the OS how to create the visual effects on the board. I have a huge Library of style code available to create really unique effects, or you can build your own custom effects with the Style Editor.
There's a lot more terminology used throughout the hobby but these are the terms you'll want to know if you're not at all familiar
Updating or Uploading to your Proffieboard
The most asked questions on Proffieboard are related to updating fonts, styles, OS, controls, etc. All updating uses the exact same process.
You need:
- Proffieboard (installed in your lightsaber or that you are installing)
- USB data cable, the board has a USB port on it, this is how you connect the board to your computer. Be mindful of the type of cable you purchase, it must be a data cable, not just a charging cable. There are combination data/charging cables these are fine.
- A computer running Windows or Mac OS (Chromebook is unable to connect)
There are a few steps (these are described in greater detail in the Manual on the page numbers listed or the links provided)
- STEP 1 - you need to get ProffieOS, Proffieboard Plugin and Arduino on your computer (pg 27 in the manual or here: https://github.com/profezzorn/ProffieOS/wiki/ProffieBoard-Setup)
- This sets up the software on your computer to update your board, follow each step described.
- ProffieOS (downloaded from here: https://fredrik.hubbe.net/lightsaber/proffieos.html) will come as a .zip file. YO uneed to extract to your desktop or a folder on your computer. You cannot run from inside the Compressed folder
- Windows Users - as noted above and in the instructions if your computer does not recognize your Proffieboard you will be running Zadig ONE-TIME to set up the drivers.
- STEP 2 - you need to get a config file (the recipe to build your custom OS)
- If your lightsaber was installed by someone else they should have provided a copy of the config.h file (it's a text file typically saved on the SD card), if you cannot find I would request from your installer.
- If you cannot find the config or you are building your own saber this site has a Configurator halfway down the page the will generate one for you: https://fredrik.hubbe.net/lightsaber/v5/
- STEP 3 - update your config.h file
- You will want to open your config file in a simple text editor like Notepad or other (do not use Word or complex word processing program as it has a tendency to add characters the OS cannot read)
- Your config will look something like below (next section), but since it will be unique to your saber it's not exact, each saber is unique.
- To change or add a font (sound file), track (sound file) or style or add more presets you will be updating this file (see next section)
- STEP 4 - define and upload your config and OS to the board through Arduino
- Refer to pg 28 in manual
- You will open ProffieOS.ino from the ProffieOS folder you extracted to your computer in Arduino in STEP 1
- If you haven't already you will define your config.h file in ProffieOS.ino and Save
- Make sure your board is connected to the computer by USB and the Port is selected in Tools (STEP 1)
- Then click Upload
Updating your Config - Adding Fonts, Tracks, Styles
As noted earlier, your config is the "recipe" for your saber. It's customized to you and you can edit or change anything you wan BUT you need to be mindful of formatting and syntax (so Arduino understands what you're trying to do).
Example config, it looks like a lot but it will make sense soon:
For more descriptions you can also check out:
To break down the important pieces see the referred color:
- NUM_BLADES #
- This is how many "blades" you have, a blade in Proffie is any LED; the actual blade, an accent LED, Crystal Chamber, they are listed individually to allow you to have a different color or style on them
- The NUM_BLADES corresponds to the BladeConfig blades[] section at the bottom, this section tells the board what type of "blade" it is so it can properly communicate, this is set up by your installer or when you install and doesn't need to be touched unless there is a mistake or a change is needed.
- VOLUME #
- This is the master volume of the saber, this will vary depending on the speaker used, 1000 ~ 3000 is typical but only if your speaker can support, if you are unsure do not change or you can blow a speaker.
- There is a volume menu available to change the volume on the fly but this value will be the max it can go
- CLASH_THRESHOLD_G #
- This is the clash sensitivity of your saber, lower means more sensitive, higher means less. The speaker volume and proximity to the board in your saber as well as the structure and supporting chassis of your saber can affect how clashes (hits) are detected. 1.0 ~ 5.0 are typical, I recommend 2.5 or 3.0 for most sabers but there are a lot of variables. If your saber has ghost clashes increase the number.
- Custom #defines
- With Proffieboard you have a ton of customization available, specifically for controls or custom features you will often add defines to this section, the ones listed are just an example as there is an ever growing list. These typically coincide with a prop file (button file) for custom controls. FETT263, SA22C, SHOTK prefixes on a define mean they are specific to the associated prop file. The example is using my prop file (props/saber_fett263_buttons.h)
- Often the defines are explained in the prop file itself (or in the instance of mine on pages like this: https://github.com/profezzorn/ProffieOS/wiki/ProffieOS5.x-saber_fett263_buttons.h-%22Battle-Mode%22-and-Gesture-Controls,-Defines-and-Usage
- Presets
- These are the sound/style combinations that make your lightsaber actually do things. In the example we have 2 blades so each preset has 2 styles, the first will be used on whatever the first blade in the BladeConfig is and the second is used on the 2nd blade
- The "Font" is the sounds from the SD card that will be played when you select this preset
- To update or change a "Font" you just change the name to match the folder on your SD card containing the new font sounds.
- The "Track" is the music that will be played when you use "Play Track"
- To update the "Track" you will enter the path to the sound file where the track can be found on your SD card. Only one track can be assigned per preset, although the next OS will allow for unlimited tracks from within a path to be used
- Styles - this is where the Style code from the library is pasted, one style per blade. If you want different colors or effects you will update this. My library contains thousands of "copy and paste" styles to help you get the most out of the board or you can try your hand at building completely custom styles if you want. The possibilities for the visual styles is nearly limitless, you just need to get the right code to make it happen.
-----------------------------------------------------------------------------------------------------------------------------
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 2
#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 COLOR_CHANGE_DIRECT
#define DISABLE_DIAGNOSTIC_COMMANDS
#define FETT263_SWING_ON
#define FETT263_TWIST_OFF
#define FETT263_FORCE_PUSH
#define FETT263_LOCKUP_DELAY 200
#endif
#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif
#ifdef CONFIG_PRESETS
Preset presets[] = {
{ "TeensySF", "tracks/venus.wav",
StylePtr<...>(),
StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan"},
{ "SmthJedi", "tracks/mars.wav",
StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(),
StylePtr<InOutSparkTip<EASYBLADE(BLUE, WHITE), 300, 800> >(), "blue"},
{ "SmthGrey", "tracks/mercury.wav",
StyleFirePtr<RED, YELLOW, 0>(),
StyleFirePtr<RED, YELLOW, 1>(), "fire"},
{ "SmthFuzz", "tracks/uranus.wav",
StyleNormalPtr<RED, WHITE, 300, 800>(),
StyleNormalPtr<RED, WHITE, 300, 800>(), "red"},
{ "RgueCmdr", "tracks/venus.wav",
StyleFirePtr<BLUE, CYAN, 0>(),
StyleFirePtr<BLUE, CYAN, 1>(), "blue fire"},
{ "TthCrstl", "tracks/mars.wav",
StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(),
StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(), "green"},
{ "TeensySF", "tracks/mercury.wav",
StyleNormalPtr<WHITE, RED, 300, 800, RED>(),
StyleNormalPtr<WHITE, RED, 300, 800, RED>(), "white"},
{ "SmthJedi", "tracks/uranus.wav",
StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(),
StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(), "yellow"},
{ "SmthGrey", "tracks/venus.wav",
StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(),
StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(), "magenta"},
{ "SmthFuzz", "tracks/mars.wav",
StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(),
StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(), "gradient"},
{ "RgueCmdr", "tracks/mercury.wav",
StyleRainbowPtr<300, 800>(),
StyleRainbowPtr<300, 800>(), "rainbow"},
{ "TthCrstl", "tracks/uranus.wav",
StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(),
StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(), "strobe"},
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
WS281XBladePtr<1, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >()
, CONFIGARRAY(presets) },
};
#endif
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif
------------------------------------------------------------------------------------------------
Important Links
Fredrik's Site links for more information:
Other important resources: