projects
/
goodfet
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09589cb
)
find Arduino's ttyACM from dmesg output
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 13 Aug 2013 12:37:49 +0000
(14:37 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 13 Aug 2013 12:37:49 +0000
(14:37 +0200)
arduino-uno-env.sh
patch
|
blob
|
history
diff --git
a/arduino-uno-env.sh
b/arduino-uno-env.sh
index
37f1850
..
1267524
100644
(file)
--- a/
arduino-uno-env.sh
+++ b/
arduino-uno-env.sh
@@
-1,4
+1,5
@@
echo source this file in current shell
export board=arduino
-export GOODFET=/dev/ttyACM0
+export GOODFET=`dmesg | grep -C 5 www.arduino.cc | grep ttyACM | cut -d: -f3 | sed 's,^ ,/dev/,'`
+test -z "$GOODFET" && echo "can't find ttyACM for Arduino plug it in and re-run script"