Skip to content

Buttons are always pressed #321

Closed
Closed

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.

Activity

  1. ddemidov commented on Apr 17, 2017

    @ddemidov
    Member

    This might be related to #286, #288. That is, you might have ev3dev kernel and the python library out of sync.

  2. WasabiFan commented on Apr 17, 2017

    @WasabiFan
    Member

    This is why we ask for specific version numbers 😉 You need to tell us the version number of both ev3dev and python-ev3dev.

  3. pipothy commented on Apr 17, 2017

    @pipothy
    Author

    Hi all, thanks a lot!

    Kernel version is 4.4.32-17-ev3dev-ev3
    python-ev3dev is 0.8.1.

    I assume I need to do an upgrade...

  4. ddemidov commented on Apr 17, 2017

    @ddemidov
    Member

    Yes, the inverted buttons issue was fixed in 18-ev3dev kernel.

  5. ensonic commented on May 2, 2017

    @ensonic
    Contributor

    Close issue?

  6. pipothy commented on May 2, 2017

    @pipothy
    Author

    This did indeed fix it so yes, this can be closed

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions