Thanks Mike, OK I understand what's in scope.
I'm still deciphering the code I have hacked together.
I want (pin) to be all analog inputs not just one.
Can I make use of these commands earlier in the code...?
int analogVal[NUMBER_OF_ANALOG_INPUTS];
int analogOld[NUMBER_OF_ANALOG_INPUTS];