Merge pull request #452 from nevd/master

Detect OS and use appropriate device and tooling
pull/453/head
Gergely Nagy 6 years ago committed by GitHub
commit 69dc4b313c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,9 +15,23 @@
set -e set -e
DEVICE="${DEVICE:-/dev/ttyACM0}" OS=$(uname -s)
case ${OS} in
Linux)
DEVICE="${DEVICE:-/dev/ttyACM0}"
stty -F "${DEVICE}" 9600 raw -echo stty -F "${DEVICE}" 9600 raw -echo
;;
Darwin)
DEVICE="${DEVICE:-/dev/cu.usbmodemCkbio01E}"
stty -f "${DEVICE}" 9600 raw -echo
;;
*)
echo "Error Unknown OS : ${OS}" >&2
exit 1
;;
esac
exec 3<"${DEVICE}" exec 3<"${DEVICE}"
echo "$@" >"${DEVICE}" echo "$@" >"${DEVICE}"

Loading…
Cancel
Save