We got some hardware working. Yeah!! However, we made some charging blades but we can't figure out how to add another blade. We just changed BLADE_NUM to 2 instead of 1 and then we added the blade style for charging under the BladeConfig blades [] section. When I do that I get this error....
Arduino: 1.8.5 (Windows 7), TD: 1.40, Board: "Teensy 3.2 / 3.1, Serial, 96 MHz (overclock), Faster, US English"
In file included from C:\Users\jeff.jones\Dropbox (Personal)\TeensySaber Software\lightsaber\lightsaber.ino:5984:0:
my_saber1.h:76: error: cannot convert 'const char*' to 'BladeStyle*' in initialization
};
There is some more stuff but it all stems from the 'const char*' initialization error. It worked when we just had one blade.
Thoughts????
We figured this out. I guess the BLADE_NUM is not what we thought. We switched it to 1 and it compiled. However, this is what I have in the BladeConfig blades [] section...
{ 2600, WS2811BladePtr<maxLedsPerStrip, WS2811_580kHz | WS2811_RGB>(), CONFIGARRAY(presets) },
{ 15000, WS2811BladePtr<1, WS2811_580kHz | WS2811_RGB>(), CONFIGARRAY(charging_presets) },
If I comment out the charging blade, then the other works just fine. When I uncomment the charging blade it thinks it is a charging blade even though it is a normal blade. Here is the output from the serial console.
Sdcard found..
ID: 728 volts 2.35 resistance= 81162.16
blade= 1
WS2811 Blade with 1 leds
Charging Style
Scanning sound font: charging done
Welcome to TeensySaber, type 'help' for more info.
I2C pullups found, initializing...
Motion setup ... done.
Amplifier off.
So, we measured the resistance of the blade and it says it is 2.597kohms. We are not sure how to make the software identify the right blade when it clearly isn't.