PhysicalButton icon indicating copy to clipboard operation
PhysicalButton copied to clipboard

[QUESTION] Does this support Waveshare 2.7" HAT on Raspberry Pi?

Open philipsd6 opened this issue 2 years ago • 1 comments

Plugin Version 0.6.1

Question The Waveshare 2.7" HAT on Raspberry Pi has an e-paper display, as well as four buttons, which operate on GPIO pins 5, 6, 13, 19. From a Python session, I'm able to use button 1 like this:

from gpiozero import Button
def handle_key1():
    print("Hello World")

btn = Button(5)
btn.when_pressed = handle_key1
# Then I press the button a few times...
Hello World
Hello World
Hello World

Your code uses gpiozero too and seems to work similarly, but I've been unable to have the following work:

Physical Button: Key 1

Am I doing something wrong?

Additional context In a shell session, as the same user OctoPrint is running as, I am able to call wall "hello world" and see the broadcast message in my terminal.

Here's an example project for this hat: RaneWallin/hello_epaper3.py

philipsd6 avatar Nov 04 '23 14:11 philipsd6

Hi,

Yes that should work. Could you enable debugging for the plugin and try to push the buttons? If the plugin recognizes the button press, the log should include a message.

Cheers, Sam

LuxuSam avatar Nov 05 '23 10:11 LuxuSam