The comparison element is used to compare an input value fed into it to a pre-defined constant target value. All comparison triggers will pass the input value along to the next element. This allows you to chain multiple comparison elements together. See the “Comparison Element Chain” demo for an example.
The comparison element is located in the Element Toolbox within Studio’s Embedded tab.
The following properties can be changed for the comparison element:
The name of the element.
The logical condition used to compare the input value and target value. This element includes the following comparison options:
Less Than or Equal
Greater Than or Equal
The pre-defined constant value to compare to the input value.
The following triggers are available to execute events from within the comparison element:
Execute an event when the source element connected to the comparison triggers.
Execute an event when the specified condition is true. The input value will be passed along with this trigger.
Execute an event when the specified condition is false. The input value will be passed along with this trigger.
Execute an event when the provided input value is invalid. This typically will refer to a value that was non-numeric.
The following abilities are available for the comparison element when its source element triggers:
Trigger the element(s) that follow the comparison element.
Perform a comparison between the input value and the target value using the specified condition.
Atmosphere includes a selection of resources for users of all levels that demonstrate using the comparison element.
To view the comparison element used within a project, click the demo’s name to open the project in Atmosphere and see how the element is set up.
|Comparison Element Chain Demo||MAX32630 Feather||The comparison element is used within this advanced demo project by chaining of comparison elements to create a “Logical And.” This demo lights the blue LED on the MAX32630 Feather board whenever the app’s slider value is between 10 and 20.|
|Comparison ESP32 Demo||HUZZAH32||The comparison element is used within this demo project by taking values from the app’s slider using BLE, comparing those values, then printing them on the debug console.|
|Comparison Rapid IoT Demo||Rapid IoT||The comparison element is used within this demo project by comparing the board’s light sensor readings and printing them on the debug console.|