Skip to content

Instantly share code, notes, and snippets.

@reeFridge
Created December 11, 2021 17:16
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 reeFridge/edfd71221d10c88cb53f8de5e61cf25f to your computer and use it in GitHub Desktop.
Save reeFridge/edfd71221d10c88cb53f8de5e61cf25f to your computer and use it in GitHub Desktop.
#!/bin/bash
LG_PO="0x20df10ef"
LG_OK="0x20df22dd"
LG_UP="0x20df02fd"
LG_LE="0x20dfe01f"
LG_DO="0x20df827d"
LG_RI="0x20df609f"
LG_BA="0x20df14eb"
LG_HO="0x20df3ec1"
while true; do
read -rsn1 input
if [ "$input" = "w" ]; then
echo "up"
echo "blast_raw "$LG_UP | nc 192.168.6.136 1337
fi
if [ "$input" = "a" ]; then
echo "left"
echo "blast_raw "$LG_LE | nc 192.168.6.136 1337
fi
if [ "$input" = "s" ]; then
echo "down"
echo "blast_raw "$LG_DO | nc 192.168.6.136 1337
fi
if [ "$input" = "d" ]; then
echo "right"
echo "blast_raw "$LG_RI | nc 192.168.6.136 1337
fi
if [ "$input" = "e" ]; then
echo "enter"
echo "blast_raw "$LG_OK | nc 192.168.6.136 1337
fi
if [ "$input" = "f" ]; then
echo "home"
echo "blast_raw "$LG_HO | nc 192.168.6.136 1337
fi
if [ "$input" = "q" ]; then
echo "back"
echo "blast_raw "$LG_BA | nc 192.168.6.136 1337
fi
if [ "$input" = "p" ]; then
echo "power"
echo "blast_raw "$LG_PO | nc 192.168.6.136 1337
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment