Waits until the specified Pin changes its state to the specified value and executes the script. High corresponds to the value 1 and low to the value 0.