Here is the program of a simple alarm device, which turns the LED on when the temperature gets higher than the desired value.
As you can note, we use the
greater node, one of the comparison nodes from the XOD standard library.
Change the logic to make the alarm working whenever the temperature gets lower than the threshold. Let the user to set this value using a potentiometer.
greater node with
map node and bind values to map 0.0…1.0 range to 15…30 degrees Celsius.
pot and bind the corresponding
Upload the program.
Rotate the potentiometer knob to set the threshold. Heat and cool down the thermometer to see how it works.
less nodes to alarm only when the temperature is out of the range. Hint: you need the