Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tank bash controller
#!/bin/bash
while true; do
read -n 1 key
case "$key" in
w)
echo 'F' > /dev/ttyACM0
;;
# s)
# echo 'B' > /dev/ttyACM0
# ;;
a)
echo 'L' > /dev/ttyACM0
;;
d)
echo 'R' > /dev/ttyACM0
;;
4)
echo '4' > /dev/ttyACM0
;;
5)
echo '5' > /dev/ttyACM0
;;
6)
echo '6' > /dev/ttyACM0
;;
7)
echo '7' > /dev/ttyACM0
;;
8)
echo '8' > /dev/ttyACM0
;;
9)
echo '9' > /dev/ttyACM0
;;
s)
echo 'S' > /dev/ttyACM0
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.