summaryrefslogtreecommitdiff
path: root/send_command.sh
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2024-06-12 02:36:19 +0100
committerKai Stevenson <kai@kaistevenson.com>2024-06-12 02:36:19 +0100
commite2a8307c8e7f1705ab19b5827cc1088fbd4aa025 (patch)
tree2fe36c24593dbe36080da1b1d92a924bc310ff82 /send_command.sh
parentc15ecfa48e45e5475b31d109254d0f35c80470b6 (diff)
util to send single command
Diffstat (limited to 'send_command.sh')
-rwxr-xr-xsend_command.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/send_command.sh b/send_command.sh
new file mode 100755
index 0000000..aa297d3
--- /dev/null
+++ b/send_command.sh
@@ -0,0 +1,6 @@
+PORT=$(arduino-cli board list | grep dev | grep -o '^\S*')
+if [ -z $PORT ];
+then
+ return "Failed to find board"
+fi
+echo "$1\n" > $PORT