Breaking apart sensor values
Posted: Monday 10 July 2023 15:33
I am setting up my sunscreens and I want them to retract when rain is expected and/or when windspeeds get to high.
I get the following values from my weather sensors
wind: 240.00;WSW;36;62;24.1;24.1
rain: 0;0.0
rain.over: 0.0000
The last value is easy to use in a blocky. If the value is between 0 and 15, there will be rain within 15 minutes and the sunscreens will go up
The other values are more of a hassle. There are multiple values in the returned date: wind direction; wind direction name; speed (36 means 3,6 m/s); gust; temperature; chill.
How can I separate these values so I can use them in blockly? I want to be able to write something like:
If the value of speed is greater than 6 or the gust is greater than 8, the sunscreens will go up.
How can I do this?
I get the following values from my weather sensors
wind: 240.00;WSW;36;62;24.1;24.1
rain: 0;0.0
rain.over: 0.0000
The last value is easy to use in a blocky. If the value is between 0 and 15, there will be rain within 15 minutes and the sunscreens will go up
The other values are more of a hassle. There are multiple values in the returned date: wind direction; wind direction name; speed (36 means 3,6 m/s); gust; temperature; chill.
How can I separate these values so I can use them in blockly? I want to be able to write something like:
If the value of speed is greater than 6 or the gust is greater than 8, the sunscreens will go up.
How can I do this?