Average Logic Element
The average logic element is used to place values into a buffer that can be averaged.
The average logic element is located in the Element Toolbox within Studio’s Application tab.
The following properties can be changed for the average logic element:
The name of the element.
The number of values within the buffer to average, using the most recent values that entered the buffer.
The following triggers are available to execute events from within the average logic element:
Execute an event when the source element connected to the average logic triggers.
Execute an event when the buffer values are averaged.
Execute an event when the source element sends a value to the end of the buffer.
Execute an event when the buffer is cleared.
Sample Size Set
Execute an event when the average sample size is set.
The following abilities are available for the average logic element when its source element triggers:
Trigger the element(s) that follow the average logic element.
Append the provided values to the end of the buffer.
Clear all values within the buffer.
Average all values within the buffer.
Set Sample Size
Set the number of values to average.
To view the Average element used within a project, click the demo’s name to open the project in Atmosphere and see how the element is set up.
|Buffer/Average Element Demo||NXP Rapid IoT||Every second, the Rapid IoT kit sends the temperature via BLE. The app will average every 6 values and send the result to a buffer. When you press the button, the latest average is popped from the buffer and printed.|