Skip to content

Instantly share code, notes, and snippets.

@jpic
Created May 2, 2016 20:35
Show Gist options
  • Save jpic/7a15b0a161f5370c407e270986668823 to your computer and use it in GitHub Desktop.
Save jpic/7a15b0a161f5370c407e270986668823 to your computer and use it in GitHub Desktop.
IOT POC
#!/bin/bash
light=off
while true; do
if hcitool scan | grep 'iPhone de Micka'; then
if [ $light = off ]; then
echo 'allumer la lampe'
light=on
fi
elif [ $light = on ]; then
echo 'eteindre la lampe'
light=off
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment