Single Accent LED Style Issue

Hey all, have a question on a bug I’m experiencing with OS6.5, at least I believe it is a software bug. I have a build that, as per my usual arrangement, I went down a deep dark rabbit hole looking for a hardware-level solution, only to discover no hardware issues whatsoever.

I have a build (very complex, most complex one I’ve ever done) that incorporates a single accent LED set up for a very simple style of Pulsing on idle, solid on power on. It used to work just fine until recently, I’m assuming when I upgraded to 6.5 (haven’t had a chance to test on 5.9). Now it doesn’t come on at all unless I do something very specific. This build has a removable crystal that incorporates two pixels and is also wired with a blade detect function. If I boot the saber up with the crystal either in or out, the accent LED doesn’t light up. However, if I temporarily add/remove the crystal, the LED then works until I power the saber off completely via kill switch/battery remove.

Any chance this is an OS bug? Or is there some other crazy issue I haven’t considered yet? The first time I noticed it, I had made no changes to the wiring or hardware of any kind. I can only assume it is something with my update to OS6?

I can try flashing back to 5.9, but that won’t solve the overall issue. I’ve had so many issues with this build I don’t really want to go down another rabbit hole on either a hardware or software level. If anyone knows a definite fix or can corroborate that this issue exists, that will be enough for me. Let me know what other info might be helpful, I’ll post the config when I get a chance. Thanks as always!

It sounds like a software issue, but there isn’t enough information here to make anything but educated guesses. We should be able to figure it out though.

  1. start by posting your config file
  2. do try 5.9, if the problem reliably happens only on 6.5, then clearly it’s a software issue. (software testing is much quicker and easier than hardware testing, so let’s start with that.)
  3. Can you provide some more information, and maybe pictures of how everything is wired?

You got it! #ifdef CONFIG_TOP#include "proffieboard_v2_config.h"#define NUM_BLADES 6#d -

Flashing 5.9 makes it work 100% normally, just gave it a shot. As soon as 6.5 hits, it’s out again. I actually did it twice to confirm. 5.9 makes it work 100% correctly. The first time I went back to 6.5 (note that I need to remove the speaker pod where the Accent LED in question is located to access the USB port) I reattached the pod and the light came on solid red, whereas it should be pulsing on idle. I then power cycled via kill switch and it didn’t come back on. I reflashed 5.9 and again, 100% normal. Back to 6.5 and this time the light didn’t come on at all, even initially like the first time. Def sounding like a software bug now.

What other info would you like? It would take me a hot second to draw up a full wiring diagram (at least where everything is on the board) but I can confirm 100% that my + for the LED is from the 3.3v pin and my - for the LED is FET 6. All 6 FETs are in use on this build so there’s no chance really of having swapped FETs. Blade detect, if it helps, is Pin 17 I believe is the number, the one between the second speaker pin and Data 3. Let me know what else you need.

At first I was thinking that this sounds like a “power bug”.
Blades are powered down when not in used, and sometimes it’s difficult to figure out what “not in use” means, which causes bugs. However, if this was the case, then there would be no need to trigger the crystal to fix it, it would be sufficient to simply ignite the saber.

Do you know if it detects the blade detect properly?
What does the serial monitor say?

Hey @Nikonnate . Just a thought since I just read your other OLED issue thread also. Is this the “3px blade, consisting of an arc reactor and a 2px crystal.” setup you referred to?
Are you using Blade ID or just Blade Detect?
How do you have your Arc Reactor and removable crystal wired?
FYI, Blade ID won’t work if you have any pixels between the crystal and the data pad on the board.

Blade detect works just fine. It is static detect, not ID w/ resistors. Will need to check Serial tonight, what specifically am I looking for, if anything?

Just Blade Detect. All three px are wired in series. Does that help?

I’m thinking that the serial monitor will show what was actually selected with blade detect. If anything weird occurred, it may show some sort of error message.

Ok, I ran the serial monitor under two scenarios and copy/pasted the results to this pastebin. The first one I simply booted the saber on with the crystal installed and booted it right back off. The second one I removed the crystal and reinserted it with the saber on idle.

If it looks like the saber went back and forth in quick succession between crystal and no crystal on the blade detect, that’s because it is a VERY snug fit and is tough to just pop right out on command. Other than that, I don’t see anything that jumps out at me. Although, I must admit I am fairly new to the serial monitor so I might very well be missing something.

And to answer the obvious question, when I removed the USB and plugged the speaker pod back in, the light came right on as it should.

I tried your config file, but on an uninstalled board, so I’m not entirely sure if things came on correctly or not.

Either way, I added a new serial monitor command: blade state
If you could try the ProffieOS from github and then run the blade state command when it’s working and when it’s not working, hopefully I’ll provide enough information to figure what’s going on here.

I’ll give it a shot this evening when I get home.

I am sooo sorry, I have two stupid questions for you…

Is this the one you need me to try? Under OS6.5 on this page?

I feel like such an idiot… how do I run the blade state command? tried typing into the box at the very top of the serial monitor and that didn’t do anything. I’m fairly new to the serial monitor.

So sorry for the noob questions! Let me know on these two and I’ll get back to you asap. Working form home tomorrow so I’ll be able to check in then as well from time to time.

No, just go to here:

click on the green button that says “Code”, then select download zip.
After you unzip it, rename the directory to “ProffieOS”, or arduino won’t like it.

That is exactly how you do it. (And press enter)
Of course, you’ll need the right code from github, or it won’t do anything.

no worries :slight_smile:

Ok I downloaded the correct one and renamed folder. I open the Proffie OS in that folder, make sure my port is selected, go to serial monitor and type in “blade state” no quotes, hit enter and it spits back “Whut? :blade”

I feel so dumb… is there something else I’m missing?

Try it again, the first command sometimes gets messed up.

Wait, you did upload, right?

I hadn’t, honestly… already past my bedtime lol

It still is giving the same error after flashing though.

I think I forgot something: You need ENABLE_DEVELOPER_COMMANDS in your config file…

Think I got it now! When booting normal, i.e. accent LED not working, it shows this… I think this must be what you’re looking for:

SimpleBlade: on = 1. power = 1
SimpleBlade: on = 1. power = 1
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
Whut? :blade

When I bump the crystal, it does this:

SimpleBlade: on = 1. power = 1
SimpleBlade: on = 1. power = 1
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
WS2811 blade: on=1 power=1 run=1 allow_disable=0 power_off_requested=0
Whut? :blade

So looks like no change… Also I’m guessing the reason that it is only displaying five blades instead of the six that my config lists is that one of them is a sub blade array split into two blades?

That is what I was looking for, and if there is no change, that means the reason it’s not working is somewhere else. You are also correct that this only shows information for physical blades, not subblades.

I’m going to try this a little more tonight to see if I can figure out what’s going on.

1 Like