Merge pull request #99 from nicka101/patch-1

Update uart_log.sh for easier debugging
This commit is contained in:
Ben V. Brown 2024-05-10 08:47:37 +10:00 committed by GitHub
commit 61f736b66b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
#!/usr/bin/env sh #!/usr/bin/env sh
num=$(find /dev -name 'ttyUSB*' | rev | cut -c 1) rightbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if00
echo "$num" leftbud=/dev/serial/by-id/usb-wch.cn_USB_Dual_Serial_0123456789-if02
sudo minicom "port$num"
read -p "Which bud do you want to connect to UART for? L/R (default L): " -n 1 -r
ttydev=$leftbud
if [[ $REPLY =~ ^[Rr]$ ]]; then
ttydev=$rightbud
fi
sudo minicom -D $ttydev -b 2000000