Thermostat and Humidity#2


#1


My attempt at getting my thermostat to lower (cooling) in 1 degree increments if humidity goes above 60. It does drop it by 1 degree when it goes below 60 but that’s it. Can it be made to continue checking and lowering by 1 if it’s still above 60? Sorry for the blank post. Any help appreciated


Humidity Control Help
#2

You can use a while loop.

Keep your IF statement. Add a while loop inside that IF statement. While humidity is greater than 60 lower setpoint, wait (insert amount of time before checking again)
End while
End if


#3

Thanks much! I’ll give it a try.


#4

I don’t quite understand how to put in the while loop. Tried reading up on it but…Any help appreciated.


#5

Ensure that advanced statements are enabled. This setting is under option in the top right of the piston editor. Then select add a new statement. Select while loop.


#6

Thanks!


#7

Sure thing. If you need further help just ask away.


#8

Hi there. Building my first piston. :slight_smile:

Could someone post the final code for this.It’s exactly what I am aiming for!

Thanks so much. Hope you all are doing great.