I saw the below video on youtube and wondered if I could do some similar but using the Teensyboard and Audio shield.
Doing some research the setup is fairly simple.
A single trigger that activates the sound file and then plays a āflame effectā light cycle on the LED rings.
Currently this is either using a breadboard or a custom PCB for the Arduino & DFPlayer.
The Teendsboard with Audioshield seems like a perfect option to replicate this.
Just wondering if Proffie can accomodate the code side of things.
Potentially could add a smoke machine later on into itā¦
A proffieboard can do all of this.
A teensy + audio shield + amplifier would also work.
A simple prop file could be coded up to make it behave the right way. Itās not particularly difficult, and I could help if needed.
Ideally Iād like to use the tennsy route. Just from an ease of availability really.
For that we would need an amplifier in addition?
Iād really appreciate any help you could offer with the coding!
There are several audio-out solutions for the teensy, but the standard āaudio shieldā provides un-amplified audio-out, so you would want something like a battery-powered speaker to provide some power.
ProffieOS can use the sound shield, if you want to run ProffieOS on it.
Ah ok, Iām using the teensy & audio shield for a sound glove setup so am familiar with the hardware and installing ProffieOS onto it.
Itās why i thought this would be the perfect solution over the Arduino/DFPlayer.
I use a powered speaker with that setup.
I have a few ideas for this setup, but would be good to get a proof of concept going to trigger the audio and the flame effect lights from a single button.
The simplest test would be to just use the saber prop, but configure the button as a latching button. (Even though it isnāt a latching button.) Doing this will make the saber turn on when you press the button and turn off when you release it. From there on itās just a matter of setting up the sounds accordingly.
Ok. This is great thankyou. Iām ordering parts now so can move forward with a test.
If I were to try a normal speaker and then needing some kind of amp setup is there something you could recommend?
I like these to drive saber-sized speakers. never tried on anything larger than 28mm though.
https://a.co/d/0XZO70q
I wonder whether a Teensy 3.1 & Prop Shield would be a better combination to then use a standard style speaker. (To save some weight for one thing).
Would this be a viable option and still run ProffieOS on it?
Yep, that should still work.
Ok cool, Iāll think Iāll try it with the Audio Shield first as I have them already.
But I may well go down the Proffieboard to make things easier in the long runā¦
Could you point me in the right direction on what I need to change on the saber prop for the ālatchā button.
Also I assume the sound file needs to be a specific name etc?
Sorry Iām only just familiar with using the micom profile so this is jumping in the deep end for me. haha
You donāt need to change anything in the prop, at least not to start with.
All you need to do is to change this in your config file:
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
to:
LatchingButton PowerButton(BUTTON_POWER, powerButtonPin, "pow");
This page should have what you need:
Most important sounds are going to be in
, out
and hum
. (Or, you can use poweron/poweroff instead of out/in if you prefer a gapless playback kind of thingā¦)
Sorry, is there a āstandardā saber config file for using with Teensy Audio Shield?
Iām looking but there are so manyā¦
Start with this one:
The audio shield is āV1ā hardware.
Note that this file assumes you have an SD card reader as well, if you do not you need to remove ENABLE_SD and store all the files on the serial flash.
Perfect, thankyou.
Ok so I change the button config in this file to be a latch.
I see this then references the v1_config.h file and the power button pin is pin 16.
So the latch button goes to ground & 16.
As Iāll be using the audio shield It has the SD Card reader with it so thats easy enough.
So for the light rings I am using, the data in would go to a bladePowerpin?
I think for starters Iāll just use the āhumā sound to prove it works.
Do I need to define some configuration for the LEDās or will this config file just fire them up anyway?
No, bladePowerPin is meant to an (optional) FET that controls the power to the neopixels.
The neopixel data will come from bladePin (20).
The graflex_v1_config.h gets all of itās styles and presets from the ācommon_config.hā file. They are all ancient, but they should work for testing.
Ok got it.
Thanks again. Iāll go away and have a play.
Just wanted to confirm something in the common_presets.h file.
I see the long list of presets. To utilise one of these I create a folder on the SD card that matches?
EG:
Preset presets[] = {
{ "hero", "tracks/duel.wav", StyleNormalPtr<CYAN, WHITE, 300, 800>(), "cyan" },
I create a folder called hero with a track called duel.wav in it?
Close.
A folder called hero
with a sound font in it, and a directory called tracks
with dual.wav
in it.
(Neither tracks
, nor dual.wav
lives in the font folder with this setup.)
In general, itās probably easier to change the config file and re-upload than to match the folders that are already in the config file.
ācommon_presets.hā is very old, and contains the setup that I used for some of my older sabers. Itās in a separate file, because I shared the same config between multiple sabers.