Help with Config

Hi Everybody. Thanks for reading this! I’ll do my best to keep it short. I’m building a Creepy Uncle saber with led’s in the control box, a neopixel in the CC and an OLED screen. It’s wired like this.

Blade - LED 3 (18) + LED 2 (19), Data 1 (16)
Crystal Chamber NPX - LED4 (10), Data 2 (1)
Green LED - Negative to LED 5 (5) Positive to Battery with resistor
Red LED - Negative to LED 6 (6) Positive to battery with resistor
OLED - wired according to schematic

Here’s what I’m trying to do with it.

*Green Arrow blinks on ignition
*Red Arrow blinks on retraction
*Random flashing while on

*Crystal Chamber to mimic the blade

*OLED displays OS on boot up, font name/animation and animation while on.

*Color Changing

Here are my questions so far.

  1. How do I set up the blade config for this setup? I’m sure I need to define which pins the led’s and CC npxl are wired to but I’m not sure how.

  2. Where do I get OLED BMP files? It looks like I’ll need a boot.bmp, font.bmp and I’m not sure what I’ll need to name the one that plays while the saber is on. Also, do these go in an assigned folder or just in the font folder?

  3. Do I need to add anything to be able to change colors?

I’m sure I’ll have more questions before I get this wrapped up. Thanks again everyone!

Potential blade config:

BladeConfig blades[] = {
 { 0, 
    // Main blade
   WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    // Neopixel Crystal chamber
    WS281XBladePtr<1, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(),
    // Green LED
    SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),
    // Red LED
    SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(),
  CONFIGARRAY(presets) },

My recommendation is to make it work first, and then tweak the styles to do what you actually want.

Some oled files comes with the fonts. Some you will have to go find. There isn’t a central repository at this time. ProffieOS will show some of the things you want without any files too.

You do not need to add anything in order to be able to change colors. If you want more comprehensive edit menues, you should check out Fett263’s edit mode.

1 Like

Here’s a bunch of images you are welcome to.
An on.bmp plays when the blade is on. Images can go right in the font folder, or in a common font folder to use for any font that doesn’t contain them.

1 Like

Thanks for the help and for sharing the bmp’s. I really appreciate it. I loaded the default setup and SD card. Everything seems to be working fine. Now it’s time to add a custom config.

So I’m trying my first custom config. When it boots I’m hearing font directory not found while it’s playing the boot sound. Don’t know why. I’m also not getting anything from my arrow leds. I know they work since they fired with the default config. Means I’m doing something wrong. Also, I’m not sure which order I should put the blade styles. I think they go like this.

  1. Main Blade
    2)Accent LED
    3)Accent LED
    4)Crystal Chamber

I’m not sure which led is which. Here’s a copy of my config, as well. Using Fett’s library.

The order of the blade styles must match the oder of the blades in your blade config. As long as that is true, you can put them in any order you like.

Do you have a “GRUMPYUNCLE” directory on your sd card?
Does it contain a font? What’s the path to the hum wav sound(s)?
Do you have a “common” directory on your sd card?
Does it contain a voice pack?

I don’t see anything in your config file that would prevent the accent LEDs from turning on, but I don’t know how they are wired, so I don’t know if the config is correct or not.

I reverted back to the default config and my arrow leds are working. Thought it best to double check. I uploaded another config without “common” in the font directory and I’m no longer hearing font directory not found. That’s good. Still not getting anything from the arrow leds, though. I have a feeling that I’m using code for neo’s, not standard leds. Not sure though. Here’s how the leds are wired.

Green LED - Negative to LED 5 (5) Positive to Battery with resistor
Red LED - Negative to LED 6 (6) Positive to battery with resistor

Here’s the config file I’m using. Thanks again.

Seems like it should work.
Although the red/green led will only blink when it’s on, and it will take 3 seconds to start.

No joy yet. When I revert to the default SD card and config they both light up during flash on clash. That’s the only time I can get them to fire up though.

The default config has LED4/5/6 set up for R, G and B. So only some colors will make them show. Of course, white (like a clash) will turn all of them on.

Duh, I’m not thinking.
Since you’re using a white LED template, your styles needs to use white colors to light up as well.

Thanks! Unfortunately, there’s no option for white as a base color in fett’s library. I’ll try silver, I guess.

Just replace all Rgb<0,255,0> with White