Jet Pack Idea

Ok got it. So the sound font in the hero folder is what will play when the unit is turned on?
(similar to the micom config where it can announce the character?)
But the dual.wave is triggered when the button is pressed?

Obviously this is just testing proof of concept at this point.

Short answer; yes
ProffieOS will play boot.wav or font.wav from the first preset when you start it.
But of course it’s a little more complicated than that.

  • When ProffieOS starts up, it will prefer to play “boot.wav” over “font.wav” (but will fall back to “font.wav” if “boot.wav” doesn’t exist.)
  • There are ways to add/remove/reorder presets with software, and if so, the list of presets will be read from “presets.ini” and/or “presets.tmp” on the SD card.
  • If you have SAVE_STATE on, then ProffieOS will save which preset it was on last, and re-start on that preset (which may or may not be the “hero” preset.)
  • blade ID makes it so that you can have multiple preset arrays and multiple save directories, further complicating the selection…

Different props handle track playback slightly different. In the default “saber” prop, you hold the AUX button for two seconds (while off) to start playing the track, which in this case would be “dual.wav”.

Ok I’m trying to install using graflex_v1_config.h but its failing.

I get error:

fatal error: kinetis.h: No such file or directory
  166 | #include <kinetis.h>
      |          ^~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: kinetis.h: No such file or directory

If I change it to the config file I use for the sound board it installs fine…

What board you have selected in Arduino → Tools → Board?

Teensy 4.0

Try changing the include at the top of your config from “v1_config.h” to “micromod_teensy_config.h”

Damn, thought it was gonna install after that change.

Now after a bit I get:

`Multiple libraries were found for "SD.h"
  Used: C:\Users\steve\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SD
  Not used: C:\Users\steve\AppData\Local\Arduino15\libraries\SD
exit status 1

Compilation error: 'WS2811_580kHz' was not declared in this scope; did you mean 'WS2811_400kHz'?`

Just changed it to WS2811_800kHz

Ok I’ll pull down another copy and try again.
Thankyou

Unfortunatly getting another error when trying to compile and upload

C:\Users\steve\Engage\Rising Phoenix\Proffie V7.14 - Jetpack\ProffieOS\common\color.h:145:8: note: in a call to non-static member function 'void Color8::printTo(Print&)'
  145 |   void printTo(Print& p) {
      |        ^~~~~~~
Multiple libraries were found for "SD.h"
  Used: C:\Users\steve\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\SD
  Not used: C:\Users\steve\AppData\Local\Arduino15\libraries\SD
exit status 1

Compilation error: 'PWM_USECASE' has not been declared

Since I’m home (and awake) now I can give this a try.
Can you post your config file and any other relevant changes?
(Maybe just zip up all of proffieOS and attach here?)

Awesome, thankyou.
I’ve uploaded it to my dropbox and linked below. Hopefully it lets you download it.

Proffie - Jetpack

First thing: The error message you posted is just a small part of the full error, which is why I couldn’t understand it at first.

Second, I’ve fixed the problems so that it compiles. Some of the problems were in the config files, and some were in the main code. The main code problems have also been fixed on github.

Here is a zip file with the fixed code. Doesn’t mean that it actually works, but at least it compiles now.
ProffieOS.zip (4.5 MB)

2 Likes

Ok, some success…sort of.
I may be getting lost a bit with the common_presets side of things.

I have downloaded your update above and successfully installed.

I have pin 16 & ground going to the button

I have Ground going to the pixel ring, the power going to the 5v pin on the Teensy and then the data for the leds going to pin 20.

I then have a folder on the SD card called ‘here’ with a wav file called ‘font’
then a second folder called ‘tracks’ with a wav file called ‘duel’
Based on this line in common_presets.h
{ “hero”, “tracks/duel.wav”, StyleNormalPtr<CYAN, WHITE, 300, 800>(), “cyan” },

After a few seconds the ne pixel ring comes on bright white.

Nothing happens when I press the button

In the serial monitor I see this:

EVENT: Aux-Held millis=4072
EVENT: Aux-HeldMedium#1 millis=4572
EVENT: Aux-HeldMedium millis=4572
I2C TRY
I2C pullups found, initializing...
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
EVENT: Aux-HeldLong#1 millis=5772
EVENT: Aux-HeldLong millis=5772
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
Motion chip ... Motion chip timeout, trying auto-reboot of motion chip!
Motion chip ... Amplifier off.
Motion chip timeout, trying auto-reboot of motion chip!



I know you mentioned about changing to my own setup but I'll admit I'm a bit lost with how to structure it.  

Well, I suggest not using common_presets.h, just create your own blades and preset array instead.
(Which it seems like what you are doing.)

Do you have a motion chip? I’m thinking you don’t in which case you should remove the ENABLE_MOTION define.

This is unfortunately the reality of creating your own hardware setup instead of going with something tried-and-true.

This seems to indicate that the board thinks you’re holding the AUX button.
Are you?
If not, I guess it’s shorted?

So I think I know what the issue was with the button, I’ve ordered a new breadboard to make that side of things easier.

You mentioned early on about a simple prop file being used for this setup.
Would the prop file hold the led behaviour and the config file be used to handle the playing of the audio when the button is pressed and then different audio when it is released?

Any help with coding would be greatly appreciated but at the same time I understand if its nothing something you have time to do.

Ultimatly the cycle is:
Button Press - Audio 1 is played and the LED rings create a flame effect.
Button Release - Audio 2 is played and LED rings stop.

Did you wind up using a latching button? This looks like you want a momentary switch. Latching might be:

Button Press (latch, circuit closed) - Audio 1 (out.wav would be ignition, hum.wav would be the flame rumble) + Flame Style

Button Press (un-latch, circuit open) - Audio 2 (in.wav as power off/ cool down)

Cool project!

I’m not really sure if you need a prop file.
Using a latching button will do the basics for what you need, and it’s not clear what else you need yet IMHO.
Generally speaking, the job of the prop file is to translate input events (buttons, motion, etc.) into events that the style code and sound playback code can understand. In the case of the latching button, a button press event becomes a “turn on” event, and a button release event becomes a “turn off” event.
During a “turn on” event, the sound code will play “out.wav”, and “in.wav” is played during “turn off” events. While on, “hum.wav” will play. (looped)
How LEDs handle “turn on/off” events is determined by the style. In most cases turn on/off also translates into actually turning LEDs on and off, but honestly, it could do anything.

So in your case, I would think that putting the right sound effects into in/out/hum.wav, using an appropriate style, and a latching button would accomplish what you want, or at least most of it. Once that is working, we can figure out what else you need, and maybe then a special prop will be needed.

Right ok, thankyou.

I changed the V1 electronics file to use micromod_teensy_config.h
I noticed the v1_config isn’t for TEENSY4 (i did a typo above stating I was using Teensy 3.1 but I’m using 4.0).
I was also getting an error when using the v1_config when trying to compile.

In the micromod file the bladepin is 15 so I have moved the neopixel data over.
I also changed the button config from latching to button as I am testing with a momentary switch.
This has resolved the Button held Event issue.
I now see EVENTS for Power-Pressed and Power-Released.

I have added '// ’ infront of the #define ENABLE_MOTION but i still constantly get the Motion chip timeout messages.

However currently there is no LED activity when I press the button. :frowning: