Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vystrela
Created July 16, 2017 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vystrela/829f9539c4fb9ba50a751c3b5b0bfe51 to your computer and use it in GitHub Desktop.
Save vystrela/829f9539c4fb9ba50a751c3b5b0bfe51 to your computer and use it in GitHub Desktop.
Connect to HDMI2USB serial using bash and cat
#!/bin/bash
function restore {
stty echo
kill $CATPID
}
trap restore EXIT
stty -echo
cat /dev/ttyACM0 &
CATPID=$!
IFS=
while read -n 1 -d\\0 -r a
do
printf "${a}" >/dev/ttyACM0
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment