Control Box LEDs will not illuminate for ROTJ Cave Sequence

Hey all, so i’ve got this issue with my proffie board … This is on a creepy uncle install and the creepy uncle has a basic helper board that goes into the control box. It’s got two slots for the Green and Red LEDs (positive and negative pads, no data pad) along with slots and pads for the two switches. The hilt comes with a green and red 3mm LED. I have it set up as 3 blades with the Green LED wired to the Proffie at LED 4 and the red to LED 5. I have resistors on each of these negative lines as well, the Green has a 10 ohm 1/8W resistor and the Red LED has a 68 ohm 1/8W resistor. The person I am building this for wants the control box to act like the Cave Scene in ROTJ (X # of green flashes, then X# of red flashes when off, then solid green when the saber is on). I went on Fett’s OS6 library and tried my best to create that, and here is that config file: #ifdef CONFIG_TOP#include "proffieboard_v2_config.h"#define NUM_BLADES 3#d - Pastebin.com

The issue is that this config will not light up either the Red or Green LEDs. When I switch out the blade styles for the config box with just a random sequence that i have from another saber it works just fine. Here is the example of the working config: #ifdef CONFIG_TOP#include "proffieboard_v2_config.h"#define NUM_BLADES 3#d - Pastebin.com

Basically, what am i doing wrong in the first config file?? Thanks in advance.

You’re sure it’s actually wired the way you have it set up in the BladeConfig?

SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(),
SimpleBladePtr<CreeXPE2WhiteTemplate<550>, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),

I’d start there and make sure the LEDs are correctly wired to the LED pads you are telling the config to use.

If you’re sure they are wired correctly, just try using this style for both, if they light up then you’re good if not something is wired differently or incorrectly.

StylePtr<White>(),
StylePtr<White>(),

If they are plain LEDs (not RGB) its better to use White instead of a color. This will provide full power to the LED, Green or Red would only apply 33% power :wink:

1 Like

I double checked the wiring and it’s like I said, Green LED (-) is resistored and soldered to LED pad 4, Red LED (-) is resistored and soldered to LED pad 5. I tried the code you provided and both LEDs lit up. My green is a little more dim than usual, but it’s lighting up along with the Red, so I can’t figure out why my original Config with the ROTJ cave sequence isn’t working …

Try an Accent style from the library, just choose White.

1 Like

THAT WORKED! Thanks man!

You’re welcome, good to hear.

1 Like

FYI you don’t really need a resistor on the green LED. Red definitely does though.

1 Like

I’m considering just submitting a struct for a typical control box LED template which would take advantage of ProffieOS’s overheat protection when using no resistors. This would be added to leds.h, and would allow users to simply use something like GreenArrowLED,0 in the blades[] array, as opposed to the ones geared toward high power Cree LEDs and needing resistors. Of course resistors are a nice safety, but it can be conveinent to omit them.

1 Like

That would be awesome. Until the other day I had no idea you could program a Proffie to do that.

This would be really useful. I do build my own structs for accent LEDs which I include in my config as necessary, but my knowledge isn’t enough to know whether I’ve set it right to make the most of the available overheat protection… Hence I have to use resistors as well to be on the safe side. But a suitable struct for hilts where space is tight would be really useful.

The problem is that not all LEDs have the same behavior, and the overhead protection needs to be tuned to the specific LED that you use. To some degree, most LEDs that have the same color behave similar. Checking in a one-size-fits all LED struct means that it has to be tuned to protect even the smallest, weakest LEDs that people might use, which also means that it won’t allow the full brightness for bigger, stronger LEDs.

That said, if we can find a reasonable compromise that won’t fry people’s LEDs, then I’m all for it.

I wrote an AccentLED struct by measuring the LEDs, which I wish more people would do so we could build a database and find a good average value. I can’t remember if they were both white and therefore could use the same specs, or if they were Red and Green and I went with the Red, lower values for safety. I ended up turning the brightness down in the styles anyway as I don’t feel control box LEDs should be anything more than indicators, not projection bright :man_shrugging:

As long as it’s still bright enough, that is fine.
But we definitely need different structs for different colors.
Ideally, we could ask the supplier exactly what LED they are using, then we can say “this is the struct for PXW1723987432” or whatever the LED is actually called.

1 Like