more python
This commit is contained in:
parent
6c083e13df
commit
629483e8bf
@ -127,20 +127,20 @@ def handle_button(pin):
|
||||
|
||||
# Loop through out buttons and attach the "handle_button" function to each
|
||||
# We're watching the "FALLING" edge (transition from 3.3V to Ground) and
|
||||
# picking a generous bouncetime of 100ms to smooth out button presses.
|
||||
# picking a generous bouncetime of 150ms to smooth out button presses.
|
||||
for pin in BUTTONS:
|
||||
GPIO.add_event_detect(pin, GPIO.FALLING, handle_button, bouncetime=100)
|
||||
GPIO.add_event_detect(pin, GPIO.FALLING, handle_button, bouncetime=150)
|
||||
|
||||
while True:
|
||||
if display.show_menu is True:
|
||||
# test menu
|
||||
display.updateMenu(
|
||||
[
|
||||
{"output": "▲"},
|
||||
{"output": "▲", "selected": False},
|
||||
{"output": "Toggle repeat", "selected": True},
|
||||
{"output": "Toggle shuffle"},
|
||||
{"output": "View queue"},
|
||||
{"output": "▼"}
|
||||
{"output": "Toggle shuffle", "selected": False},
|
||||
{"output": "View queue", "selected": False},
|
||||
{"output": "▼", "selected": False}
|
||||
]
|
||||
)
|
||||
# test album art
|
||||
|
Loading…
Reference in New Issue
Block a user