OLED graphs: last value (internal_oled_data_last)¶
What it does: Returns the last value of a data list; returns the default value for an empty list.

Inputs¶
- list
LIST: parameter selection in the block menu.
Output¶
- Value.
When to use it¶
- When you want to display the latest sample next to the chart.
- For making decisions based on the last measured value.
Tips and pitfalls¶
- For an empty list, the helper returns the default value
0. - Use to read the last sample without manually counting the index.
Generated Python example¶
last = chart_data_last(chart_data_0, 0)