Skip to content

Button initial state is wrong if it is pressed when arduino starts #24

Description

@jeanfabre

If the button is pressed when you start the program, previousSteadyState is wrong, and you first need to wait for the button to be released for the ezbutton to start reflecting the real state.

Solution: previousSteadyState should be set to -1 and during the setup or the first loop detected as not yet HIGH or LOW and dealt with accordingly ( setting lastSteadyState to the opposite for the rest of the logic to work).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions