bossredman
Well-known member
I've just spent the last few days troubleshooting a really annoying problem with a Teensy 3.6 project of mine.
I have 24 (3 x banks of 8) momentary switches connected to Digital inputs.
One switch toggles the state/mode of the top row - so that they can perform different things in differnt modes.
The strange thing is, when flipped to the 2nd mode, the 5th Switch stops working after the first time it is pressed.
All other switches work OK.
Even flipping back to mode 1 - switch 5 still does not work.
I had to reset the Teensy to get it to work again.
After confirming it wasn't a hardware/switch issue - I finally tracked down the lines of code that were causing the issue ... more specifically the 2 lines with "Param4_Value"
This variable declared earlier as
It is only called up in 1 other place & that is used to display the value on a screen.
After reaching the verge of going crazy - for some reason I decided to rename the variable to "Param44_Value" & hey presto - everything works!
Although glad it's resolved, I'm desperate to understand why this was happening.
ANy ideas anyone pls?
I have 24 (3 x banks of 8) momentary switches connected to Digital inputs.
One switch toggles the state/mode of the top row - so that they can perform different things in differnt modes.
The strange thing is, when flipped to the 2nd mode, the 5th Switch stops working after the first time it is pressed.
All other switches work OK.
Even flipping back to mode 1 - switch 5 still does not work.
I had to reset the Teensy to get it to work again.
After confirming it wasn't a hardware/switch issue - I finally tracked down the lines of code that were causing the issue ... more specifically the 2 lines with "Param4_Value"
for (int i=0; i<Value_Len; ++i)
{
Param4_Value = {' '};
}
for (int i=0; i<Value_Len; ++i)
{
Param4_Value = MIDI.getSysExArray()[i+18];
}
This variable declared earlier as
.char Param4_Value[8];
It is only called up in 1 other place & that is used to display the value on a screen.
but I confirmed that that line was not causing the issue.mydisp[5].print(Param4_Value);
After reaching the verge of going crazy - for some reason I decided to rename the variable to "Param44_Value" & hey presto - everything works!
Although glad it's resolved, I'm desperate to understand why this was happening.
ANy ideas anyone pls?