Hi all, long time listener, first time caller. Love your show.
My question is this: Is there a feasible way of having one standard code that would average analog inputs only if they are physically connected to the microcontroller? For the project I am working on, I don't want to rewrite the sketch depending upon how many analog inputs are present. I want the end user to be able to plug in up to 3 inputs and have the sketch calculate the average accurately no matter if it's 1, 2 or 3 connected. There is an RC low pass filter for each one of the inputs, so individual input smoothing isn't necessary, just multiple input averaging. I'm thinking of something analogous to the Microsoft Excel function that only uses a cell's value if something is actually entered into that cell; if it's blank, it's not included in the average.