Logic
When-Then conditions are one of the most important elements in programming to control your program code. With if-then you can, for example, express the following:
- If Temperature less than 20 degrees, Then The heater on
- If no Wlan signal, Then store the measured values on SD card
![block](../pictures/blocks/logic/logic-0.png)
If-Then
With the If then condition you can control your program code and perform certain actions, if a certain status has occurred. To use the if-then block you must always add a comparison condition![block](../pictures/blocks/logic/logic-gif-0.gif)
If-Then Extensions
The Normal If then condition can be extended by clicking on the gear. You can add more conditions by clicking and dragging on the normal if-then conditions to check more conditions or perform another action if the if-then condition does not occur. After editing, you can close the window by clicking on the gear again.![block](../pictures/blocks/logic/logic-2.png)
Comparison condition
This block is attached to the if-then conditions and allows the comparison of two![block](../pictures/blocks/logic/logic-7.png)
Example
For example, a block looks like this that reads the temperature and stores it in the Temperature variable. If the temperature is higher than 25, "It is warm" will be displayed on the comma line. If the conditions are not met, the program block is simply ignored and the program continues to run.![block](../pictures/blocks/logic/logic-4.png)
Headline
Description of the![block](../pictures/blocks/logic/logic-5.png)
Headline
Description of the![block](../pictures/blocks/logic/logic-6.png)