How would you guys tackle this one?
I'm using a db18b20 to measure pool water temperature in a pipe near the pump. When the pump is running, the water in the pipe is the same temperature as the water in the pool. When the pump is off, the water in the pipe is static and the temperature begins to drift due to ambient temperature and sunlight on the pipe.
I want to read temperature only when the water is flowing, so only when the pump is on. When the pump is off, I want to stop reading temperature. I suppose I could use a relay to control power to the db18b20, but I think I'd just get a reading of 0°C; besides, it's not a very elegant solution. I'd rather find a rules-based solution.
Any slick ideas out there?
How do I read an input only when a condition is met?
Moderators: grovkillen, Stuntteam, TD-er
Re: How do I read an input only when a condition is met?
If you measure the temp, what are you doing with the value ? send it somewhere ? Control something directly ? Have it on a Display ?
you are thinking the wrong way - why not always reading the temperature but only doing something when the pump is running ?
Does your ESP know if the pump is running ?
you are thinking the wrong way - why not always reading the temperature but only doing something when the pump is running ?
Does your ESP know if the pump is running ?
Re: How do I read an input only when a condition is met?
I want to display the pool water temperature realtime value and trend. I'll have that on my personal website; friends and family will be able to tell what the water's like from where ever they are. I will also use an average daily value to compare against chlorine load, but that's down the road a bit.
My ESP controls the pump via relay on Clock#Time events.
My ESP controls the pump via relay on Clock#Time events.
Who is online
Users browsing this forum: No registered users and 12 guests