Skip to content

Buttons are always pressed #321

@pipothy

Description

@pipothy

I am trying to make a piece of code where I want any button press to interrupt the loop. I am doing so exactly as the examples do, and the documentation suggests:

btn = Button()

while not btn.any():
[Insert code here]

However, it seems that this doesn't work and the loop never initiates. I checked the buttons_pressed and it shows all buttons pressed, but none of them have been pressed at all. Any idea why, or how I solve this?

Using EV3Dev's latest flash file, Python 3.4.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions