Is there a built in function to test if a boolean has changed states? I could always record the state of a boolean and compare the last value to the current value and then update the last value to the current value but am interested in knowing whether a built-in function to handle this scenario.
I think what you described is the way to handle it. Have a second variable to store the previous state. Check if current value is not equal to previous value.
This post is under review.