Jet Pack Idea

Ok realised I was doing bits in the wrong place.
Do I need to change NUM_BLADES from 1 to 2?

I then have added:

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "SmthGrey", "tracks/press.wav",
    StyleFirePtr<RED, YELLOW>(),
    StylePtr<InOutHelper<White, 1,1>>(), "fire"},

And then:

BladeConfig blades[] = {
 { 0, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SimpleBladePtr<>()
  , CONFIGARRAY(presets) },
};
#endif

But I’m getting:

In file included from C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\ProffieOS.ino:698:
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:24:22: error: no matching function for call to 'SimpleBladePtr()'
   24 |     SimpleBladePtr<>()
      |                      ^
In file included from C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\ProffieOS.ino:630:
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\blades\simple_blade.h:287:18: note: candidate: 'template<class LED1, class LED2, class LED3, class LED4, int pin1, int pin2, int pin3, int pin4> BladeBase* SimpleBladePtr()'
  287 | class BladeBase *SimpleBladePtr() {
      |                  ^~~~~~~~~~~~~~
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\blades\simple_blade.h:287:18: note:   template argument deduction/substitution failed:
In file included from C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\ProffieOS.ino:698:
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:24:22: note:   couldn't deduce template parameter 'LED1'
   24 |     SimpleBladePtr<>()
      |                      ^

exit status 1

Compilation error: no matching function for call to 'SimpleBladePtr()'

Also I just wanted to confirm for the relay I’m looking to trigger a High/Low rather than power change.
The relay would run from the boards 5v & Gnd. It then has an ‘IN’ pin which can recieve a High to activate the other side of the relay and then a Low to deactivate it.

Don’t think I explained that well before and wether it changes anything.

SimpleBladePtr needs template arguments, like this:

    SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, blade6Pin, -1, -1, -1>()

You can read more about it here:

The style I showed you switches from low to high in one millisecond. If that’s not fast enough, you could use something like: StylePtr<Mix<IfOn<Int<32768>, Int<0>>, White, Black>>(); which is instantaneous.

It’s also possible to mess with the led struct to make it only do on and off, but that seems like more work.

Ok, I have it configured like below and it is compiling now and uploaded.
However the relay still isn’t triggering.

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "SmthGrey", "tracks/press.wav",
    StyleFirePtr<RED, YELLOW>(),
    StylePtr<InOutHelper<White, 1,1>>(), "fire"}
};

BladeConfig blades[] = {
 { 0, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>()
  , CONFIGARRAY(presets) },
};
#endif

It really should.
What is the other end of the relay coil wired to?

So I followed this article initially with the Teensy - HERE

I have the Grd connected to Grd, The Positive connected to the 5v pin.
And then the IN connected to LED6 (25).
The power lights comes on. But the green activated light doesn’t come on when I press the button like it does on the Teensy.

I think the way you have it wired, it assumes that LED6 produces positive voltage when on, but that not how it works. LED6 is connected to GND when on, and NOT connected to GND when off.

I think you want to connect IN and + together, then hook up GND (on the relay) to LED6.

Right ok. One step forward one step back. Haha

So by doing what you suggested seems to work. The relay activates and the fan spins.

However I notice when I first push the button the neopixel starts the flame effect it’s configured for. And the two lights on the relay come on.

But after say 1 second the relay lights dim and the neopixel fire flashing stops and the LEDs are just red.

If I disconnect the relay the neopixel behaves normally.

Almost as if it’s a power drain having both.

I know the power pack is good as it runs it all on the teensy fine.

Are you using the 5v output from the proffieboard?
I recommend not doing that, just use BATT+ instead.

I was.

Just moved over to Batt + and both are working as expected!
Awesome.
Just need to work on the led pattern now and have a fade in and out as part of it’s setup.

Hey, so the style editor is…confusing. haha.
But realistically I think the StyleFirePtr is good enough.
But only thought is if its possible to have the Fade in and Fade out?

Obviously this is all designed for an LED strip whereas I’m using a ring.

Ideally I want the ring to illuminate red in a fading in style over 700ms and then go into the ‘Fire Style’ And then when the button is released the red/orange fades out over 1000ms.

Is this likely to be possible?

Definitely possible :slight_smile:

The editor opens with a basic layered example.

On the right you can highlight different boxes to see which part of the code does what. They’re will be a layer for in and out which can be fade in and fade out. The numbers will represent the timings, usually in milliseconds.

EDIT: Reading over the thread, I’m not sure if you’re are still on Teensy or switched to proffie. If on proffie, there is usually a combination of effects in Fett263 public access library.

  • List item
1 Like

Something like this maybe:

StylePtr<Layers<
  StyleFire<Red,Yellow,0,2,FireConfig<0,2000,5>,FireConfig<3000,0,0>,FireConfig<0,5000,10>,FireConfig<0,0,10>>,
  InOutTrL<TrFade<1000>,TrFade<1000>>>>()

Ok, this is likely something I’m doing wrong.
I added the above to my config file, but the fade in/out didn’t seem to be doing anything.
I’ve been playing around with it in the style editor and change the In to 5000.
I click submit and then power and it does seem to have a gradual ramp up effect.
However if I click power again its instant and the fade in doesn’t happen.
Same with the board & leds. First time the fade in is there, but press the button again and its on instantly. If I cycle power the first press has the fade.

But then no matter what I set the fadeout to the lights just go off immediatly.
Below is my code, perhaps you see similar results in the style editor?

#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 1
#define VOLUME 1000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 1.0
#define ENABLE_AUDIO
#define DISABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define DEFAULT_PRESET 1
#endif

#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "SmthGrey", "tracks/press.wav",
    StylePtr<Layers<
  StyleFire<Red,Yellow,0,2,FireConfig<0,2000,5>,FireConfig<3000,0,0>,FireConfig<0,5000,10>,FireConfig<0,0,10>>,
   InOutTrL<TrFade<5000>,TrFade<10000>>>>(),
   StylePtr<InOutHelper<White, 1,1>>(), "fire"}
};

BladeConfig blades[] = {
 { 0, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin1, bladePowerPin2> >(),
    SimpleBladePtr<CH1LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>()
  , CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
LatchingButton PowerButton(BUTTON_POWER, powerButtonPin, "pow");
#endif

Appreicate you getting involved! :slight_smile:
So the Fett263 builder is interesting and think it may well do what I need.

I have tried doing the fadein/out in the StyleEditor but I think the nature of the Fire config affects how it works. Compared to say just a red blade.

But the Fett263 looks promising. Just need to get my head around it. lol

I like your project a lot and want to see it work! Plus I think I could be useful for other jet packers.

I’m not sure if you should try using the “main blade” builder or the “accent/led”. With the main blade builder the off behavior is always set to “black”. With the accent LED builder off behaviors can also be set via the menus in the library.

It’s the fact that each LED in your ring should essentially do the same thing, so that ignition and retraction have to be “full blade”, that’s a little tricky with fire blades since they sort of rise and fade out like a flame would if it was coming from a blow torch.

I think the Fett263 is the way forward. There is a fireblade there I am using and managed to do the fade in & fade out which just illuminates the whole blade rather than reinacting the idea of it going ‘in & out’.
I just need to tweak colors now.

The next hurdle I am facing is sound.
Fredrik suggested renaming in01 & out01 with th sounds I want to use.
This works fine for the in as the sound I am using simulates the jetpack shutting down which is short similar to the sound used of the saber shutting down.

However the sound I am using for the out is around 30 seconds long as it simmulates the jetpack starting and then ‘running’. The idea is this sounds plays whilst the button is pressed. But shuts off when the button is released.

But what I’m finding is the file is playing in its entirety and the in file doesn’t then play.

You’ll need Fett263’s prop file to get the full use of all of his stuff, but it seems you’re getting some action. The beauty of the style Profezzorn suggested is that it works with your button set up.

Are Fett’s controls compatible? Or, thinking the other way, is the style you made compatible with the controls/button set up you have?

I have the same behaviour whether I am using Profezzorn style or Fett263.

Ultimately I’m using a Latching button.
Hold to ‘ignite’ the jetpack release to turn it off.

Obviously for a saber the ‘out’ wav is short. It plays and thats that.

As my ‘out’ file is long it is playing the whole thing.
I can hear the ‘in’ sound playing behind it when the button is released.

Ideally what I want is the out file to only play whilst the button is held. But I’m guessing thats probably going to be easier said than done…

I am by no means an expert, on the contrary I am just starting with all this, but I am thinking about eventually creating a jetpack_prop.h. It is still a long way away but it was inspired by this thread.

What I was thinking for the out sound, you need one that is somewhat short for the starting part, then use the hum sound for the running part. The hum needs to be able to loop (the ending needs to link back into the beginning seamlessly).

1 Like