Created
July 16, 2017 02:51
-
-
Save vystrela/829f9539c4fb9ba50a751c3b5b0bfe51 to your computer and use it in GitHub Desktop.
Connect to HDMI2USB serial using bash and cat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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