(finally took the time to create myself an account here ^^)
So I would like to use 2 distinct blade detect on a build (one for the crystal, one for the blade) and I just want to make sure I design my custom connectors correctly.
I’ve read this topic and would thus go with option 4, with 2 separate detect pins.
Would this crude schema correct then?
Any preference between connecting the Blade Detect 1 to either + or Ground?
I understand the other Blade Detect 2 (for the blade) will work as usual using the NPXL connector bridging BD pin with -)
Now for the coding part (unfortunately my weak point), I’d need help or maybe an example of how this would look.
Requirements would be:
1 - play a short circuit sound when Act switch is pressed, and either crystal is missing, or both blade and crystal are missing.
2 - I’d like to play a specific sound + light effect when the crystal is detected.
But still have a short circuit sound when act switch is pressed.
3 - Saber works as usual when both crystal and blade are detected.
Thanks a lot in advance for the support
Hi Rick, welcome to the fun zone!
We can now use Blade ID in real time to detect if a blade is connected or not, and which one, and Blade Detect can even be omitted.
For example, I have a test hilt using 3 blade arrays. With the chassis out of the hilt, it uses one of them, another when chassis inserted into hilt, and the 3rd when blade is added. Any combination is detected upon the connection made, and I don’t even have any blade ID resistors installed anywhere.
Now I’m on a train heading home, but I can read your post in more detail when I get a moment and also post examples of what I have working. For now, if you search "blade ID constant monitoring " or “real-time Blade ID” on here you should find some discussion.
As NoSloppy points out, you could use blade detect for the custom connector, and continuous blade ID to detect the blade itself. This saves one wire and means you need little or no code modifications.
However, if you want to wire it up with two separate blade detects, that’s not all that hard either.
Probably the easiest way is to just add a PullDownButton to your config file, and then write a special blade ID class that polls the value of that button and adds 500000 to the blade ID.
Then you would need to set up four entries in the blade array (no blade + no crystal, no blade, no crystal and finally blade and crystal)
Finally, you would need to add a few lines to the prop to trigger re-checking the blade array when the state of your PullDownButton changes.
None of this is particularly difficult… once you know how…
(Which I can probably help with.)
Thanks both for your answers!
Ok, that’s good to hear. Best is to proceed by saving a wire and what you suggest with “blade detect” on the crystal and “continuous bladeID” on the blade
I think I understand the blade array point, but I won’t pretend to have understood how “continuous blade ID” work (or at least i’ll have to spend more time reading the search suggested by NoSloppy ^^).
But thanks to your confirmation, I can already proceed with finishing the custom connector design
Ah, and I target to bring RFID for the crystal into this. I don’t think there would be any issue aside coding in doing so, right?
RFID should fit in well.
If you use the same RFID module I did, you just need a few defines, plus an array that defines which command is executed when a particular crystal is seen.
Unfortunately there are no commands for switching between blade array entries currently, so if that’s what you want the crystal to do, we’ll need to add some new code, but again, I can help with that.
There doesn’t seem to be a POD page specifically for RFID setup right now, but you can find most of the information you need at the end of this page:
Ditto on the welcome Darth Ryo. I can’t wait to see how this turns out.