updated code to average 10000 samples again as it turns out the resistance flatlines over time