Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons Error (platform-gpio-keys.0-event not found) #182

Closed
laurensvalk opened this issue Sep 24, 2017 · 3 comments
Closed

Buttons Error (platform-gpio-keys.0-event not found) #182

laurensvalk opened this issue Sep 24, 2017 · 3 comments

Comments

@laurensvalk
Copy link

It appears that Buttons do not work.

I'm using the latest ev3dev stretch on my ev3, with no modifications/additional installs.

Possibly similar to this, but the error looks different.

Traceback (most recent call last):
  File "/home/robot/testing/prog.py", line 4, in <module>
    btn = ev3.Button()
  File "/usr/lib/python3/dist-packages/ev3dev/core.py", line 2554, in __init__
    self._file_cache[name] = open(name, 'rb', 0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/by-path/platform-gpio-keys.0-event'

Minimum example, copied from here.

#!/usr/bin/env python3
import ev3dev.ev3 as ev3

btn = ev3.Button()
# Is 'Left' button pressed?
print('yes' if btn.left else 'no')

# Check if any buttons are pressed:
print('yes' if btn.any() else 'no')
@laurensvalk
Copy link
Author

I've posted this in the wrong place. I'll repost in ev3dev-lang-python.

@ddemidov
Copy link
Member

ddemidov commented Sep 24, 2017

This should be fixed by #181 (but is not yet published as a package).

@laurensvalk
Copy link
Author

Ok, great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants