Just purchased the button-shim. When I try and run the example, I get:
pi@raspberrypi:~/Pimoroni/button-shim/examples $ sudo python3 keyboard.py
Button SHIM: keyboard.py
Trigger keyboard key presses with Button SHIM.
Press Ctrl+C to exit.
Traceback (most recent call last):
File "keyboard.py", line 33, in <module>
@buttonshim.on_press(BUTTONS)
File "/usr/local/lib/python3.7/dist-packages/buttonshim/__init__.py", line 294, in on_press
setup()
File "/usr/local/lib/python3.7/dist-packages/buttonshim/__init__.py", line 188, in setup
_bus.write_byte_data(ADDR, REG_CONFIG, 0b00011111)
OSError: [Errno 121] Remote I/O error
Exception ignored in: <function InputDevice.__del__ at 0xb6328e40>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 159, in __del__
File "/usr/local/lib/python3.7/dist-packages/evdev/device.py", line 304, in close
File "/usr/local/lib/python3.7/dist-packages/evdev/eventio_async.py", line 54, in close
File "/usr/lib/python3.7/asyncio/events.py", line 640, in get_event_loop
File "/usr/lib/python3.7/asyncio/events.py", line 660, in new_event_loop
File "/usr/lib/python3.7/asyncio/unix_events.py", line 51, in __init__
File "/usr/lib/python3.7/asyncio/selector_events.py", line 49, in __init__
File "/usr/lib/python3.7/asyncio/base_events.py", line 373, in __init__
File "/usr/lib/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0xb636c4b0>
Traceback (most recent call last):
File "/usr/lib/python3.7/asyncio/base_events.py", line 622, in __del__
File "/usr/lib/python3.7/asyncio/base_events.py", line 390, in __repr__
File "/usr/lib/python3.7/asyncio/base_events.py", line 1794, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
I’m pretty sure I see it on the I2C bus (this is a PI Zero W):
pi@raspberrypi:~/Pimoroni/button-shim/examples $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --