Skip to content

Instantly share code, notes, and snippets.

@marcinwadon
Created February 9, 2016 22:12
Show Gist options
  • Save marcinwadon/1934fccf436a05e33525 to your computer and use it in GitHub Desktop.
Save marcinwadon/1934fccf436a05e33525 to your computer and use it in GitHub Desktop.
Arduino wifi ESP8266
#!/bin/bash
SELECT=""
IFS=''
while [[ "$SELECT" != $'\x0a' && "$SELECT" != $'\x20' ]]; do
read -s -N 1 SELECT
if [[ "$SELECT" == $'a' ]]
then
telnet 192.168.0.101 8767 <<EOF
L|35
EOF
fi
if [[ "$SELECT" == $'d' ]]
then
telnet 192.168.0.101 8767 <<EOF
R|35
EOF
fi
if [[ "$SELECT" == $'s' ]]
then
telnet 192.168.0.101 8767 <<EOF
L|0
EOF
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment