Low\High Temp monitor code help

Do you have a question on how to do something.
Ask in here.
Post Reply
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Low\High Temp monitor code help

Post by 00Warpig00 »

ok changed it to the following like lnevo's suggestion.

T1Read = ReefAngel.Params.Temp[T1_PROBE];
if (T1Read !=0)
{
T1LowTemp = min(T1LowTemp, T1Read);
T1HighTemp = max(T1HighTemp, T1Read);
}

With the if not 0 the code works. somehow in the early loops through the code it was always getting a 0 first and setting the low to 0. still having some weirdness. When I took the probe out of the tank and let it float in the air the low temp drifted all the way down to 592 as a low (its 77 degrees in the room (or 770), proving again the compare logic is working when 0 is not getting in the way. Then it started drifting back up toward room temp. Probe back in the tank and things seem to be working ok for now.

Thanks Guys :)

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Low\High Temp monitor code help

Post by 00Warpig00 »

lnevo wrote:What you can do too is average out the sampling and look at the average low temp over x samples and then do your comparison. You might still need to drop 0 values but lets see what happens with your check let me know if you still need sample code.
I was thinking about doing a rolling average when i saw the number float down down down to 593 or so earlier. seems if the probe is in the water it seems pretty stable. I put the probe back in the water. It's been back in there for about 10 minutes and the delta between my hi and low is only 005 (half a degree) I can live with that if it stays that way. I wouldn't even waste the time with a rolling average for that small of a fluctuation.

Again Thanks lnevo that zero has bugged me for a long time.

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
Post Reply