
Purple
USA
Asked
— Edited

I have about 5 adc units of noise on my 256 adc analog inputs. Also the battery voltage and cpu temperature are noisy. I have checked my incoming battery voltage and it is steady. I tried to filter the analog inputs but no luck there. Thanks oops I guess I can not go back and fix my typo in the title.
Wow @Rich, you just saved me a stressful hour or two resurrecting my math skills. I was just going to sit down and try to write this same script. Thanks!
Thanks Rich, I'll be sure to give this a try.
I could have done it a quicker way too by making a loop that goes around 10 times adding the ADC value each time then diving it at the end... But I wrote that without thinking too much.
This is a more economical method.
You could, if you wanted to, increase the number of readings easily by changing the 10 in the repeatuntil and the 10 in the $ADCValue = Round($ADCValue/10,2)
You could also go for more or less decimal places by changing the 2 in the Round($ADCValue/10,2)
You may even be able to remove or reduce the sleep(10) or increase it if you aren't checking every 100ms.