Add some Serial.print() statements to setPins() to show the spectrumValue and highPinCnt.
When spectrumValue is less than 70, highPinCnt should equal 0.
The if(i<=highPinCnt) should be if(i<highPinCnt).
Add some Serial.print() statements to setPins() to show the spectrumValue and highPinCnt.
When spectrumValue is less than 70, highPinCnt should equal 0.
The if(i<=highPinCnt) should be if(i<highPinCnt).