X-Git-Url: http://plrg.eecs.uci.edu/git/?p=pingpong.git;a=blobdiff_plain;f=automation%2Fclicker.sh;h=ba75e256ef309a7adfac590196ddefcf8fc7f29a;hp=50a88add479f911d1eac29d8e740038da7b821fe;hb=2e29319e311ab1cb579a42f3664dabc029bd819d;hpb=e9493226ca4e5aeeb9d0e262cea272feb37ef221 diff --git a/automation/clicker.sh b/automation/clicker.sh index 50a88ad..ba75e25 100755 --- a/automation/clicker.sh +++ b/automation/clicker.sh @@ -5,20 +5,47 @@ # Loop variables BEGIN=1 -END=5 +END=100 INC=1 # Range of random number (in seconds) -RAN_STA=2 -RAN_END=6 +RAN_STA=100 +RAN_END=200 for ((i=$BEGIN; i<=$END; i+=$INC)); do + + date +"%m/%d/%Y %r" + #./adb shell getevent -l - use this command to get the position # TP-Link switch #./adb shell input tap 1002 913 - date +%r + # TP-Link bulb on/off + #./adb shell input tap 994 560 + # D-Link switch + #./adb shell input tap 987 346 + # SmartThings + #./adb shell input tap 921 1188 + # WeMo + #./adb shell input tap 981 532 + # WeMo Insight + #./adb shell input tap 981 326 + # Kwikset doorlock + #if (( $i % 2 )) + #then + # locking + # ./adb shell input tap 153 1211 + #else + # unlocking + # ./adb shell input tap 520 1211 + #fi + # Hue bulb + ./adb shell input tap 923 383 + #date +%r #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA] - RAND=$[`jot -r 1 $RAN_STA $RAN_END`] + #RAND=$[`jot -r 1 $RAN_STA $RAN_END`] #echo "Delay: $RAND seconds" - sleep $[$RAND]s + #sleep $[$RAND]s + + # pick a prime number > 120 seconds + sleep 131s done