Ok found error but not why it malfunctioned..
It turns out it had nothing to do with the serial lines or libraries. Had the line
if (turbinePos>=2 || turbinePos<8) { //handle all normal spin positions
should have been:
if (turbinePos>=2 && turbinePos<8) { //handle all normal spin positions
I still dont understand how that error worked when the serial was active and failed when serial was removed...
I would love to know the answer....
Below is the routine for one of 3 animations happening simultaneously. all other functions worked perfectly alone or in conjunction with each other with and without serial....this is the only part of my sketch that failed when serial was turned off...
All variables are comming from RC inputs and the main loop only reads those variable values and does a show() function to light the leds per the array data calculated here.
void turbineEffect(){
if (millis()-timerTurbine > turbDelay){ // create delay
//Loop lights around
if (turbinePos==0 ){ //handle trail when its split between start and end of strip
stripValues[turbinePos].setRGB(inputR,inputG,inputB);
stripValues[turbinePos].fadeLightBy(0);
stripValues[turbinePos+6].setRGB(0,0,0);
stripValues[turbinePos+6].fadeLightBy(0);
stripValues[turbinePos+7].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+7].fadeLightBy(210-turbDim);
stripValues[turbinePos+8].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+8].fadeLightBy(0);
stripValues[turbinePos+14].setRGB(0,0,0);
stripValues[turbinePos+14].fadeLightBy(0);
stripValues[turbinePos+15].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+15].fadeLightBy(210-turbDim);
stripValues[turbinePos+16].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+16].fadeLightBy(0);
stripValues[turbinePos+22].setRGB(0,0,0);
stripValues[turbinePos+22].fadeLightBy(0);
stripValues[turbinePos+23].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+23].fadeLightBy(210-turbDim);
}
if (turbinePos==1 ){//handle trail when its split between start and end of strip
stripValues[turbinePos-1].setRGB(inputR,inputG,inputB);
stripValues[turbinePos-1].fadeLightBy(210-turbDim);
stripValues[turbinePos].setRGB(inputR,inputG,inputB);
stripValues[turbinePos].fadeLightBy(0);
stripValues[turbinePos+6].setRGB(0,0,0);
stripValues[turbinePos+6].fadeLightBy(0);
stripValues[turbinePos+7].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+7].fadeLightBy(210-turbDim);
stripValues[turbinePos+8].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+8].fadeLightBy(0);
stripValues[turbinePos+14].setRGB(0,0,0);
stripValues[turbinePos+14].fadeLightBy(0);
stripValues[turbinePos+15].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+15].fadeLightBy(210-turbDim);
stripValues[turbinePos+16].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+16].fadeLightBy(0);
stripValues[turbinePos+22].setRGB(0,0,0);
stripValues[turbinePos+22].fadeLightBy(0);
}
if (turbinePos>=2 && turbinePos<8){ //handle all normal spin positions
stripValues[turbinePos-2].setRGB(0,0,0);
stripValues[turbinePos-2].fadeLightBy(0);
stripValues[turbinePos-1].setRGB(inputR,inputG,inputB);
stripValues[turbinePos-1].fadeLightBy(210-turbDim);
stripValues[turbinePos].setRGB(inputR,inputG,inputB);
stripValues[turbinePos].fadeLightBy(0);
stripValues[turbinePos+6].setRGB(0,0,0);
stripValues[turbinePos+6].fadeLightBy(0);
stripValues[turbinePos+7].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+7].fadeLightBy(210-turbDim);
stripValues[turbinePos+8].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+8].fadeLightBy(0);
stripValues[turbinePos+14].setRGB(0,0,0);
stripValues[turbinePos+14].fadeLightBy(0);
stripValues[turbinePos+15].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+15].fadeLightBy(210-turbDim);
stripValues[turbinePos+16].setRGB(inputR,inputG,inputB);
stripValues[turbinePos+16].fadeLightBy(0);
}
timerTurbine=millis(); //reset clock
turbinePos++; //move to next led position
if (turbinePos>=8) turbinePos=0; //check to see that we are not going to far
}
}