Skip to content

Commit

Permalink
Reworked print statement to reflect GPIOs are being displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
ttreker committed Jun 15, 2024
1 parent 8815963 commit 6aa87b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/7color/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
# It receives one argument: the associated gpiod event object.
def handle_button(event):
index = OFFSETS.index(event.line_offset)
pin = BUTTONS[index]
gpio_number = BUTTONS[index]
label = LABELS[index]
print(f"Button press detected on pin: {pin} label: {label}")
print(f"Button press detected on GPIO #{gpio_number} label: {label}")


while True:
Expand Down

0 comments on commit 6aa87b4

Please sign in to comment.