Created
May 2, 2016 20:35
-
-
Save jpic/7a15b0a161f5370c407e270986668823 to your computer and use it in GitHub Desktop.
IOT POC
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 | |
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