Jet Pack Idea

I think you want to use a momentary switch, but tell proffieOS that it is latching.
That way, it will be on for as long as you hold the switch, and off when you release it.

Is the LED getting power?
Is the LED getting data?

I was looking around online in regards to the Neopixel rings and found a sample config file to test the LEDs

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif
#define PIN        14
#define NUMPIXELS 16

Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
#define DELAYVAL 500

void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif

  pixels.begin();
}

void loop() {
  pixels.clear();

  for(int i=0; i<NUMPIXELS; i++) {

    pixels.setPixelColor(i, pixels.Color(0, 150, 0));
    pixels.show();
    delay(DELAYVAL);
  }
}

This worked as expected so the wiring and pin connectivity is sound.

I did also put together a basic config file (generated by AI) to test (not using Proffie) and that worked as well.

But after tinkering with the micom side of things thought Proffie would be better.
Especially with the idea of using a profileboard in future.

I thought you said it was hooked up to pin 15?

Oh yes it is now. I had one ring in 14 and another in 15 to make sure it wasnā€™t an issue with the led wiring.

Both are now in 15.

ENABLE_MOTION is on by default in latest ProffieOS, if you want to turn it off you need to use #define DISABLE_MOTION

Ok slowly clearing things up.
In the serial monitor I see
No sdcard found
SD select not pulled high

If I install the config file I have for the hand held sound unit the SD card is recognised so I know the SD card and connections are fine.
Guessing its something in the micromod_teensy_config file for the hardware side of things.

Think maybe Iā€™ll abandon this and perhaps go down the Arduino route.
Unfortunately I just canā€™t get my head around the scripting. haha
I would have liked to use a proffieboard eventually but this is way beyond me. :slight_smile:

Thanks for all your help.

A proffieboard would be much much much easier, because the existing config files would ā€œjust workā€. All of this complication is because youā€™re using a semi-supported configuration, and there is no pre-made configuration for that specific setup.

Ah ok.
I just went with the Teensy as I had some to hand and were familiar with them from your help before.

Iā€™ll look into getting a profile board for testing.

But I guess the configuration still maybe tough as Iā€™m obviously looking for it to act very different to a light sabre.

Well, it depends.
The basic functionality which you have struggled with so far should be very easy.
Then it depends on where you want to go from there and what functionality you want to add.

So ultimately when the button is pressed and held the led rings will illuminate and orange/red then flicker to resemble a flame effect.

At the same time a specific audio file is played.

Then when the button is released the LEDs fade out of a second or so and a different audio file is played.

Future scope would be adding Bluetooth functionality to trigger it but that is just a ā€˜nice to haveā€™.

All of that can be done without a new prop file.

Ok, Iā€™m sold.
Iā€™ll get one ordered.

1 Like

Bit of an update to this, I have the Proffieboard now.
Whilst waiting I have been testing with the teensy board just using Arduino code.
I have the setup how I want it to be, I just think the proffie board will be better as its smaller and has amplified audio.

The end goal would be:
Replicate the fire style LED display
Have a relay connected that is triggered via output. (fans are connected to the relay)
An RF button connected which basically acts as a momentary button (INPUT_PULLUP)
And then a specific sound file played when the button is held then another sound file played when the button is released.

Iā€™ll work on getting a basic file loaded to see if I can just get the leds to illuminate when the wired button is pressed as a starting point.
(Shame I canā€™t just use the Arduino code haha)

OK, I now have my board setup with a basic config file.
Led ring illuminates and turns off successfully with the press of the button.

So now its moving on to the flame effect.
Currently using this preset - { "SmthGrey", "tracks/mercury.wav", StyleFirePtr<RED, YELLOW>(), "fire"},
Which is close.

In my testing on the teensy board (just using basic Arduino coding, not ProffieOS).
I have configured it to have a gradual ramp up of red/orange over 700ms.
Then the random flame effect kicks in.
When the button is released it does a fade out of red/orange over 1000ms.

This is a snippet of the flame effect:

// Function to apply flame effect to a single NeoPixel ring
void applyFlameEffectToRing(Adafruit_NeoPixel& ring, int pixelIndex) {
  int red = random(MAX_RED_FLAME, MAX_BRIGHTNESS);    // Strong red component
  int green = random(10, 30);    // Lower green component
  int blue = random(0, 1);       // No blue component for flame

  if (random(10) > BURST_CHANCE) { // 30% chance for a bright burst
    red = MAX_BRIGHTNESS;
    green = random(30, 80); // Slightly higher green for burst effect
  }

Additionally on the teensy I have sound file ā€˜press.wavā€™ that plays when the button is held.
And then sound file ā€˜release.wavā€™ played when the button is released.

Where do I go from here to try and get the above configured in Proffie?

Many thanks!

There are several things you can try, depending on how attached you are to the effect you already have.

  1. If you expand StyleFirePtr in the style editor, youā€™ll find that there are lots of parameters you can adjust, including the color and speed. Unfortunately speed = 0 is probably not going to work well, even though that might make the most sense for a ring like this.
  2. You can use RandomPerFlickerL to overlay random colors, which might be more like your Arduino code. This could be done on top of the fire effect, you can use it with each color inside the StyleFire. Use the style editor to figure out which looks best.
  3. You can just take your arduino code, make it into a style and use that. The Rainbow style is a fairly simple example you could follow. Your new style can go in the CONFIG_STYLES section of the config file.

Just rename them:

press.wav ā†’ out.wav
release.wav ā†’ in.wav

Ok great, Iā€™ll have a play.
facing some issues with the SD card keeps unmounting which is odd. So will try get to the bottom of that.

Last question (for now!).
I have a relay I want to connect, which PIN is best used for this.
And whats the best way to trigger it int the code when the button is pressed?

Many thanks

If thatā€™s referring to a message in the serial monitor, then that is normal.
It doesnā€™t have any real effect on a teensy, but on a Proffieboard, unmounting the SD card allows the host computer to mount it if mass storage selected in Arduino ā†’ Tools ā†’ USB Type (at the time of upload)

First of all, did you know that the FETs can control up to 30 volts?
You might not need a relayā€¦

If you do use a relay, the FETs are probably the best way to control the relay, which means using one of the LED1-6 pads for the relay. Making it turn on when the saber is on is as simple as configure it as a SimpleBladePtr<> and giving it a style like StylePtr<InOutHelper<White, 1,1>>().

If the relay can be operated by 3.3 volts, and 20mA or less, then you could use any of the GPIO pads as well, but coils can cause complications, so itā€™s probably best to stick with the LED1-6 pads which wonā€™t have a bypass diodes to deal with such problems.

Iā€™m using a relay as connected to them are some fans that I want to run off of a 9v battery.
So just keeping that seperated. :smile:

Iā€™m trying to update the blade config but getting errors. Iā€™ve tried a few variations and obviously getting muddled.

This is what I have:

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

And this is the error:

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:18:34: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   18 |     StyleFirePtr<RED, YELLOW>(), "fire"},
      |                                  ^~~~~~
      |                                  |
      |                                  const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:20:45: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   20 |     StyleNormalPtr<RED, WHITE, 300, 800>(), "red"},
      |                                             ^~~~~
      |                                             |
      |                                             const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:22:33: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   22 |     StyleFirePtr<BLUE, CYAN>(), "blue fire"},
      |                                 ^~~~~~~~~~~
      |                                 |
      |                                 const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:24:75: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   24 |     StylePtr<InOutHelper<EASYBLADE(OnSpark<GREEN>, WHITE), 300, 800> >(), "green"},
      |                                                                           ^~~~~~~
      |                                                                           |
      |                                                                           const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:26:50: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   26 |     StyleNormalPtr<WHITE, RED, 300, 800, RED>(), "white"},
      |                                                  ^~~~~~~
      |                                                  |
      |                                                  const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:28:68: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   28 |     StyleNormalPtr<AudioFlicker<YELLOW, WHITE>, BLUE, 300, 800>(), "yellow"},
      |                                                                    ^~~~~~~~
      |                                                                    |
      |                                                                    const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:30:70: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   30 |     StylePtr<InOutSparkTip<EASYBLADE(MAGENTA, WHITE), 300, 800> >(), "magenta"},
      |                                                                      ^~~~~~~~~
      |                                                                      |
      |                                                                      const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:32:78: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   32 |     StyleNormalPtr<Gradient<RED, BLUE>, Gradient<CYAN, YELLOW>, 300, 800>(), "gradient"},
      |                                                                              ^~~~~~~~~~
      |                                                                              |
      |                                                                              const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:34:34: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   34 |     StyleRainbowPtr<300, 800>(), "rainbow"},
      |                                  ^~~~~~~~~
      |                                  |
      |                                  const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:36:53: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   36 |     StyleStrobePtr<WHITE, Rainbow, 15, 300, 800>(), "strobe"},
      |                                                     ^~~~~~~~
      |                                                     |
      |                                                     const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:38:17: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   38 |     &style_pov, "POV"},
      |                 ^~~~~
      |                 |
      |                 const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:40:22: error: cannot convert 'const char*' to 'StyleFactory*' in initialization
   40 |     &style_charging, "Battery\nLevel"}
      |                      ^~~~~~~~~~~~~~~~
      |                      |
      |                      const char*
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:45:81: error: wrong number of template arguments (2, should be at least 3)
   45 |     SimpleBladePtr<InOutHelper<White, PowerPINS<bladePowerPin5, bladePowerPin6> >()
      |                                                                                 ^
In file included from C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\ProffieOS.ino:530:
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\styles\inout_helper.h:37:9: note: provided for 'template<class T, int OUT_MILLIS, int IN_MILLIS, class OFF_COLOR> using InOutHelper = InOutHelperX<T, SingleValueAdapter<InOutFuncSVF<SingleValueAdapter<IntSVF<HUMP_WIDTH> >, SingleValueAdapter<IntSVF<MAX> > > >, OFF_COLOR>'
   37 |   using InOutHelper = InOutHelperX<T, InOutFunc<OUT_MILLIS, IN_MILLIS>, OFF_COLOR>;
      |         ^~~~~~~~~~~
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:45:5: error: parse error in template argument list
   45 |     SimpleBladePtr<InOutHelper<White, PowerPINS<bladePowerPin5, bladePowerPin6> >()
C:\Users\steve\Engage\Inferno\Proffie V7.14 - Jetpack\ProffieOS\config\jetpack_test.h:47:1: error: cannot resolve overloaded function 'SimpleBladePtr' based on conversion to type 'BladeBase*'
   47 | };
      | ^

exit status 1

Compilation error: cannot convert 'const char*' to 'StyleFactory*' in initialization