created scripts for uploading code and monitoring the mcu

This commit is contained in:
Václav Šmejkal 2024-11-13 22:50:41 +01:00
parent 6034b19f31
commit ade3dd8d8e
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 14 additions and 0 deletions

7
monitor.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
board="esp8266:esp8266:nodemcuv2"
port="/dev/ttyUSB0"
baudrate="9600"
arduino-cli monitor -b $board -p $port -c $baudrate

7
upload.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
board="esp8266:esp8266:nodemcuv2"
port="/dev/ttyUSB0"
arduino-cli compile -b $board -p $port $(pwd | rev | cut -d "/" -f 1 | rev).ino
arduino-cli upload -b $board -p $port $(pwd | rev | cut -d "/" -f 1 | rev).ino