Coding Question for Water Conductivity Sensor

Hi, my group and I are coding a conductivity sensor. Our code right now collects data from the sensor constently while it is turned on. We want the sensor to take 10 readings and average the reading every 5-10 seconds. Then apply it to a range that will turn on a led light. I am having trouble perfecting the code to do what we intend. Any suggestions? (Pictures of the device and current code attached)

Start here:
How to use this forum

Your forum post is related to the trouble you are having. Please identify those troubles so perhaps someone may help.

Paul