Page 1 of 1

Blocky script doesn't do what I want

Posted: Sunday 22 May 2022 15:28
by HoogendoornJH
I want to turn on a fan when the CO2 level in a room is above 750 ppm and turn it off when the CO2 level is below 725 ppm. However, at temperatures above 25°C under no circumstances the fan should be switched on when the outside temperature is above the inside temperature.

For this I made the attached Blocky script. However, it doesn't work. It did work without the condition that the fan should not be turned on at temperatures above 25°C when the outside temperature is above the inside temperature.

Now, is the script wrong or is Blocky unable to handle the nested If statements?

Blocky_script.jpg
Blocky_script.jpg (112.72 KiB) Viewed 2902 times

In the script it is:
Buiten Temp/Humi (Davis) = outside temperature;
Binnen Temp/Hum (Davis) = inside temperature;
CO2 Woonkamer = CO2 level in the room;
Switch Suskast Werkkamer = Switch fan.

Re: Blocky script doesn't do what I want

Posted: Sunday 22 May 2022 18:11
by cobra045
Hoi HoogendoornJH,

I think you chose the wrong "if" function.
2x * is not possible.
See image

2022-05-22_18h03_20.png
2022-05-22_18h03_20.png (124.01 KiB) Viewed 2893 times

Kind regards cobra045