Advertisement
metalx1000

Basic Serial Port Reader

Jun 25th, 2016
715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.17 KB | None | 0 0
  1. #!/bin/bash
  2. stty raw -echo < /dev/ttyUSB0;
  3. cat -vte /dev/ttyUSB0|while read line;
  4. do
  5.   if [[ "$line" == *"9516AE"* ]];
  6.   then
  7.     echo "You clicked 3";
  8.   fi;
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement