add small helper script cangrow.sh
This commit is contained in:
parent
f696d58212
commit
c02c150339
1 changed files with 28 additions and 0 deletions
28
cangrow.sh
Executable file
28
cangrow.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
TTY=/dev/ttyUSB0
|
||||
|
||||
function help() {
|
||||
echo "$0 [build|upload|monitor]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
test -z $1 && help
|
||||
|
||||
case $1 in
|
||||
b|build)
|
||||
test -d build || mkdir build
|
||||
~/.local/bin/arduino-cli --no-color compile -b esp8266:esp8266:d1_mini_clone "Arduino/CanGrow/CanGrow.ino" --output-dir build/
|
||||
;;
|
||||
u|upload)
|
||||
~/.local/bin/arduino-cli --no-color compile -v -b esp8266:esp8266:d1_mini_clone -u -p $TTY "Arduino/CanGrow/CanGrow.ino"
|
||||
;;
|
||||
|
||||
m|mon|monitor)
|
||||
~/.local/bin/arduino-cli monitor -c baudrate=115200 -p $TTY
|
||||
;;
|
||||
*)
|
||||
help
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue