Hello All,
I am working on a project that controls multiple relays based on various temperature ranges. I am having trouble figuring out how to define the various temperature ranges in the if statements.
Let's say I am wanting to do the following.
If temperature is between 20c and 25c turn on relay one, turn off all other relays.
If temperature is between 25.1c and 35c, turn on relay two, turn off all other relays.
If temperature is between 35.1c and 40c, turn on relay three, turn off all other relays.
I know how to do everything but define the temperature ranges in the if statements, and I also know how to do this with two set temperatures such as:
If Temperature is less than 20c turn off relay 1.
If Temperature is greater than 20c turn on relay 1
My trouble is how to define a temperature range in the if statement.