How Can I setup my saber to make a sound when my blade is inserted and Removed?
Blade ID is setup, but it isn’t playing a sound.
How Can I setup my saber to make a sound when my blade is inserted and Removed?
Blade ID is setup, but it isn’t playing a sound.
Do you have blade detect set up?
(Blade detect and blade ID are different things.)
Even without blade detect, it’s possible to configure blade ID to run continuously so that we can detect when the blade is inserted or removed. (Or do you already have that configured too?)
I’m running Blade Id, And it is currently setup for Continuous monitoring, Everythings working well, besides my tiny showoff blade, it’s way too close to my other blades in resistance, Easy fix though.
here’s my Config #ifdef CONFIG_TOP#include "proffieboard_v2_config.h"#define BLADE_ID_CLASS B - Pastebin.com
I would suggest trying ProffieOS from the github master branch, then add bladein.wav and bladout.wav files to your fonts if they don’t already have them.
Ok, I’ll check that out, Where Can I find the Master branch?
Edit found it, immediately have compiling errors.
Second edit: Pesky Slashes, my bad, found the error.
My saber is now perfoming a blade switching loop after uploading the new config.
It’s possibly my resistor values are fluctuating, but theres no ID data anymore, typing ScanID does nothing either
So what do you see in the serial monitor?
NO_BLADE_ID_RANGE 12400,12550
that doesn’t seem right.
{ 12400,
WS281XBladePtr<8, bladePin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(),
WS281XBladePtr<2, blade3Pin, Color8::GRBw, PowerPINS<bladePowerPin2> >(),
CONFIGARRAY(No_Blade), "No_Blade_Save" },
This value should say { NO_BLADE,.......
I see it swapping between blade arrays lightning fast, but there’s no way to tell what the resistance is to compensate for it.
Atm No Blade measures from 723000 Ohms to 780000 Ohm.
The Blade measures at around 660000 to 690000 Ohms
OS7.14 handles it fine, no rapid array switching, but the master version will not work properly and keeps switching rapidy.
The only way for me to measure values is via uploading the old proffieOS first.
The bottom value?
if that’s the measurements, then you want something like
#define NO_BLADE_ID_RANGE 720000, 800000
BladeConfig blades[] = {
{ 675000,
WS281XBladePtr<108, bladePin, Color8::GRBw, PowerPINS<bladePowerPin4, bladePowerPin5> >(),
WS281XBladePtr<2, blade3Pin, Color8::GRBw, PowerPINS<bladePowerPin2> >(),
CONFIGARRAY(Blade_1), "Blade_1_Save" },
{ NO_BLADE,
WS281XBladePtr<8, bladePin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(),
WS281XBladePtr<2, blade3Pin, Color8::GRBw, PowerPINS<bladePowerPin2> >(),
CONFIGARRAY(No_Blade), "No_Blade_Save" },
};
Oh thats works next to perfectly, Thankyou so much, Quick question, could one use a resistor at the End of a neopixel blade for blade ID? My short dagger blade is superglued shut, and only the tip will come off, but the values are too similar to other values
Unfortunately, I think it’ll only register if it’s before any pixels inline.
I see you have #define BLADE_ID_CLASS BridgedPullupBladeID<bladeIdentifyPin, 9>
so it’s assumed you bridged data1 to TX pin?
The similarity in values could be due to having the emitter PCB in parallel with then main, but who knows.
Sounds like your answer would be to modify the blade that you can get into and leave the shorty as-is?
OS7 doesn’t support NO_BLADE_ID_RANGE
I think what is happening here is that your NO_BLADE_ID_RANGE is too narrow, making it sometimes measure inside that range and sometimes not, which could cause the rapid switching.
Also, as NoSloppy points out, you need to use NO_BLADE instead of 12400 in your blades array, because with NO_BLADE_ID_RANGE, it will return NO_BLADE instead of 12400, AND that is also how it knows to play bladeout.wav instead of bladein.wav.
is there any new commands for scanning the resistance? ScanID isn’t working in the master update atm
No, there is not. It should still work:
Hm, ScanID IS doing absolutely nothing when I’m inputting it, It shows in my prop file just as you sent, but the command does nothing.
Try commenting these three out while you’re testing:
#define BLADE_ID_SCAN_MILLIS 1000
#define BLADE_ID_TIMES 10
#define NO_BLADE_ID_RANGE 12480,12509
Also, what version of the arduino-proffieboard plugin do you have?
That worked for me, How do I check the version?
Open Arduino, go tools, Board, Board Manager…, scroll down till you see Proffieboard, read the version installed (It should be 3.6 or 3.6.0 depending if you are using Arduino IDE 2.3.X or Arduino 1.8.19)