Thermometer eblock Issues

I have code showing up on screen and checking the temp every 5 seconds. I have an alert setup when it reaches 85+ or below 60. The eblock is working, all plugged in and installed. The temp goes crazy! 71 F to 68F… to 74f and can be stable for a few readings. Sometimes it jumps to 125F. This will be bad for monitoring… Any clues as to why? Using the code provided.

Thanks in Advance.

trying grounding the unused analog inputs.

you should also be averaging the readings over a period of time instead of looking at individual values.

How would one go about grounding all? I guess I don’t follow why it would not read correctly each time. Why would I need to average readings…

This is a simple eblock. If you needed accuracy consider using one wire digital temp sensors.

That basically means you connect all unused analog pins to ground (GND).

Because analog is analog, it fluctuates.

Because analog fluctuates. By reading each time 100 samples and take the average, you’ll get a more constant reading.