Newer
Older
M5StickCPlus_FactoryTest2022 / monitor.sh
@motoki miura motoki miura on 5 Apr 2022 345 bytes espnow testing...
#!/bin/bash

# get serial port via board list, choose lines including "USB", and pick up 1st word
serial=`arduino-cli board list | grep USB | awk '{print $1}'`

echo ${serial}
if [ -z "${serial}" ]; then
  echo "No device connected."
  exit  
fi

# open serial monitor (CTRL+C to quit)
arduino-cli monitor -p ${serial} --config baudrate=115200