
Originally Posted by
Demon
[U]...ADC readings for this pot are 2 - 254 ([I]I had removed 2 bottom bits...
I'm an idiot. I thought I was being smart by ignoring any ADC variation under 3, turns out I was causing my own problem.
Code:
if ADCinput <> oldADC1 then
ADCinput = ADCinput >> 2
if ADCinput < oldADC1 then
ADCdiff = oldadc1 - adcinput
else
ADCdiff = adcinput - oldadc1
endif
IF ADCdiff > 2 THEN
...process ADC,,,
...
If ADC falls on 1-2 or 253-254 as turned fully, it would never update when hitting 0 or 255.
It was just random luck it was always THAT pot that did it, and not the 2nd pot.
I should change my sig to:
"I'm my worst enemy"
Bookmarks