Wouldn't it be a lot simpler to record the value of millis() when the button is pressed and record it again to a different variable when the button is released? The difference between the two values will be the time it was pressed.
...R
Wouldn't it be a lot simpler to record the value of millis() when the button is pressed and record it again to a different variable when the button is released? The difference between the two values will be the time it was pressed.
...R