#!/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}

# upload sketch in this folder
arduino-cli upload --fqbn esp32:esp32:m5stick-c -p ${serial} "."
