Now, let’s learn how to work with conditionals in XOD.
We will measure a lightness level, and if the values exceed or are below the threshold, we will turn an LED on or off.
less-than nodes to do simple mathematical
comparisons. They are in
IN1 and right
IN2 pins receive numbers to compare, and the output
OUT pin returns the comparison result expressed as a boolean value (true or
greater) node to trigger an action when a measured parameter goes under (or over) a threshold value.
In the example shown, if the
analog-sensor node (our photoresistor) returns a
value greater than the threshold, the
greater node will set the
OUT pin to
true, and the LED will turn on.