ilbertt / XPT2046-Python

Python library for XPT2046 Touchscreen
10 stars 5 forks source link

AttributeError: 'Button' object has no attribute 'when_relesed' #2

Closed dgshue closed 3 years ago

dgshue commented 3 years ago

There seems to be a few issues, this being one of them. Not sure if it's my version of gpiozero or what. Disabling the line gets passed the error, but I get no output from the test script.

I also get another message as well:

Traceback (most recent call last): File "touch-test.py", line 19, in xpt = Touch(spi, cs=cs, int_pin=irq, int_handler=touchscreen_press) File "/home/pi/XPT2046-Python/xpt2046.py", line 38, in init self.cs.direction = digitalio.Direction.OUTPUT File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 131, in setattr self.class.name, name)) AttributeError: 'DigitalOutputDevice' object has no attribute 'direction'

gpiozero - 1.6.2 Adafruit-Blinka - 6.13.0

ilbertt commented 3 years ago

The second error you get seems to be the same of #1. It seems the new gpiozero versions have some changes. You can try removing errors using the (partial) @mattmo92270's solution at https://github.com/Luca8991/XPT2046-Python/issues/1#issuecomment-769405795. Let me know if you find a better solution.

PRs are welcome!

ilbertt commented 3 years ago

closed with #3