Refactor
This commit is contained in:
parent
1cb7075180
commit
aef37123fd
4 changed files with 81 additions and 72 deletions
|
|
@ -1,8 +1,8 @@
|
|||
# example_switch_macro.py
|
||||
import time
|
||||
from switch_pico_uart import SwitchUARTClient, SwitchButton, SwitchDpad
|
||||
from switch_pico_uart import SwitchUARTClient, SwitchButton, SwitchDpad, first_serial_port
|
||||
|
||||
PORT = "COM5" # change to your serial port, e.g. /dev/cu.usbserial-0001
|
||||
PORT = first_serial_port(include_descriptions=["USB to UART"]) or "COM5" # auto-pick first serial port, or fall back
|
||||
SEND_INTERVAL = 1 / 500 # optional: match controller_uart_bridge default
|
||||
|
||||
# Convenience list of every SwitchButton (plus DPAD directions).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue